Skip to content

Integrate Plugin Check Namer as standard AI Name Check#1390

Open
ishitaj34 wants to merge 6 commits into
WordPress:trunkfrom
ishitaj34:fix/issue-1370
Open

Integrate Plugin Check Namer as standard AI Name Check#1390
ishitaj34 wants to merge 6 commits into
WordPress:trunkfrom
ishitaj34:fix/issue-1370

Conversation

@ishitaj34

@ishitaj34 ishitaj34 commented Jul 10, 2026

Copy link
Copy Markdown

What?

Closes #1370

Migrates the standalone Plugin Check Namer tool directly into the main audit suite as a standard static check. It deprecates and removes the separate Namer submenu page and its custom JS/HTML frontend assets.

Why?

  • Simplifies the user experience by integrating plugin name analysis into the existing AI analysis workflow.
  • Improves maintainability by removing custom AJAX endpoints, settings, JavaScript workarounds, and UI code in favor of the standard static check framework.
  • Adds WP-CLI support by running name analysis through the standard check pipeline, enabling wp plugin check <plugin-slug> --ai without custom CLI handling.

How?

  • Added AI_Name_Check, a new Static_Check implementation that reads the plugin name and author from the plugin headers using get_plugin_data(), performs AI-based name analysis, and reports guideline violations as standard Plugin Check errors and warnings.
  • Registered the ai_name check in Default_Check_Repository.php so it runs as part of the default check set.
  • Made should_use_ai() public and added get_ai_model_preference() to allow checks to access the current AI configuration.
  • Removed the deprecated Plugin Check Namer workflow by deleting its admin page, submenu registration, and frontend assets.
  • Added PHPUnit test covering AI-disabled behavior for the new check.

Testing Instructions

Via Admin Screen:

  1. Navigate to Tools -> Plugin Check in the WordPress Admin area.
  2. Choose a plugin to test.
  3. Toggle the "Enable AI Analysis" option under AI Settings.
  4. Click Check It.
  5. Verify that plugin name analysis runs and reports any guideline violations or similarity warnings inline with the standard Plugin Check results.

Via CLI:

  1. Run standard checks with AI enabled:
wp plugin check <plugin-slug> --ai
  1. Verify that name guideline check runs and displays output inline with the rest of the check failures.

Run Unit Tests:

  1. Boot up test suite:
npm run wp-env:start:tests
  1. Run tests to confirm AI_Name_Check_Tests executes and passes:
npm run test-php

AI Usage Disclosure

  • This PR was created without the help of AI tools
  • This PR includes AI-assisted code or content

If AI tools were used, please describe how they were used:

Used Gemini coding assistant to plan the refactoring path, draft unit test suite, and compile the deprecation cleanup list.

Open WordPress Playground Preview

@davidperezgar

Copy link
Copy Markdown
Member

Hello! Thanks for the contribution. Please resolve the conflicts, so we can review this PR.

@ishitaj34 ishitaj34 marked this pull request as ready for review July 13, 2026 07:52
@github-actions

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ishitaj34 <ishitaj34@git.wordpress.org>
Co-authored-by: davidperezgar <davidperez@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate Plugin Check Namer into Plugin Check AI Analysis

2 participants