Integrate Plugin Check Namer as standard AI Name Check - #1449
davidperezgar wants to merge 12 commits into
Conversation
|
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. |
…ility The new set_runner() method (added to support AI Name Check in AJAX-only static check requests) pushed the public method count above PHPMD's threshold. Suppressing the rule here follows the same pattern already used in Admin_Page, Settings_Page, Abstract_Check_Runner and Check_Result.
SummaryAdds an ✅ What's good
|
Summary
Closes #1370
Integrates the standalone Plugin Check Namer tool into Plugin Check as a new AI Name Check, available as a checkbox under the AI settings on the Tools > Plugin Check admin page, in the CLI (
--ai-name), and via AJAX.The check analyzes the plugin's display name (read from its own headers, no extra input required) and reports:
plugin_name_disallowed)plugin_name_issue)plugin_name_trademark_issue)plugin_name_similarity)Changes
WordPress\Plugin_Check\Checker\Checks\Plugin_Repo\AI_Name_Check, a newStatic_Checkregistered inDefault_Check_Repositoryunder theai_nameslug (Plugin Repo category), reusing the existingAI_Check_Names/AI_Utilstraits for the AI analysis logic.Namer_Pageadmin page and its dedicatedplugin-check-namer.jsscript, since the functionality now lives inside the main Plugin Check tool.Abstract_Check_Runner::set_use_ai_name()/should_use_ai_name()/get_ai_model_preference()so runners (AJAX, CLI) can toggle and expose the new option.--ai-nameflag to thewp plugin checkCLI command.Plugin_Request_Utility::get_runner()was alwaysnullduring static-check-only AJAX requests (the runner is otherwise only registered via theobject-cache.phpdrop-in used for runtime checks), soAI_Name_Check::run()silently bailed out even when the checkbox was checked. AddedPlugin_Request_Utility::set_runner()and register the runner fromAdmin_AJAX::get_ajax_runner(), reusing that same instance inrun_checks().AI_Name_Check_Testscovering the new check.Testing
wp plugin check <plugin> --checks=ai_name --ai-name --require=./wp-content/plugins/plugin-check/cli.php.debug.logduring either flow.Disclaimer
Part of this PR (code and/or this description) was developed with the assistance of AI (Claude, via GitHub Copilot / Claude Code). All changes have been manually reviewed and tested by a human before submission.