Skip to content

Integrate Plugin Check Namer as standard AI Name Check#1390

Draft
ishitaj34 wants to merge 1 commit into
WordPress:trunkfrom
ishitaj34:fix/issue-1370
Draft

Integrate Plugin Check Namer as standard AI Name Check#1390
ishitaj34 wants to merge 1 commit 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 UX by combining all directory requirement checks into a single scan report.
  • Improves maintainability by removeing custom AJAX endpoints, settings, JavaScript workarounds, etc. by using the core static check framework.
  • Adds WP-CLI support by running AI name analysis through the standard static check pipeline, enabling wp plugin check <slug> --ai without custom CLI handling.

How?

  • Created AI_Name_Check.php implementing Static_Check. It parses the name and author from plugin headers via get_plugin_data() and runs AI queries if the active runner has enabled AI. Guideline violations are mapped directly to standard check Errors and Warnings.
  • Registered check in Default_Check_Repository.php so it is included in 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 Namer workflow by deleting the submenu registration from Plugin_Main.php and removing unused files.
  • Added unit test to verify.

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 the name and guidelines analysis runs and formats any conflicts/similarities directly as Error or Warning rows inside the result tables.

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.

@davidperezgar

Copy link
Copy Markdown
Member

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

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