Fix Namer tool detection of exact and near-exact existing plugins#1393
Fix Namer tool detection of exact and near-exact existing plugins#1393NoumaanAhamed wants to merge 8 commits into
Conversation
… to detect naming conflicts
…PHPMD complexity errors
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Updated |
|
Hello, I've used codex and it found this:
|
|
Hey @davidperezgar good catch, Both addressed:
|
Description
Fixes #1386.
When using the Plugin Check Namer tool, the AI models (
similar_namequery) sometimes fail to detect already-published plugins that exist in the WordPress.org Plugin Directory (such as exact or near-exact slug matches). As reported in #1386, evaluating a live plugin like"LessFlux Image & Video Optimizer – WebP, AVIF, CDN & Lazy Load"previously returned"Generally Allowable"without flagging the existingless-fluxplugin conflict.Workaround & Solution
To ensure reliable detection of existing plugins without relying solely on AI model training data cutoffs:
query_wordpress_org_directory()inAI_Check_Namesto programmatically check candidate slugs and top search matches via WordPress core'splugins_api().build_similar_name_context()so the pre-review model evaluates against verified existing plugins on WordPress.org.is_exact_match),possible_naming_issuesis automatically flagged (true) along with a clear explanation linking directly to the conflicting WordPress.org plugin page.confusion_existing_pluginswith both direct API matches and AI-suggested matches for the review interface.Testing Instructions
LessFlux Image & Video Optimizer – WebP, AVIF, CDN & Lazy Loadpossible_naming_issuesas true and displays the existing WordPress.org plugin match underconfusion_existing_plugins.AI Usage Disclosure
If AI tools were used, please describe how they were used:
Used Claude Opus 4.6 for code review, identifying the root cause (single-word search limitation), and refining the implementation.