woocommerce-code-review

Review WooCommerce code changes for coding standards compliance. Use when reviewing code locally, performing automated PR reviews, or checking code quality in WooCommerce projects.

⭐9stars🔀0forks📁View on GitHub🕐Updated Jan 1, 2026

When & Why to Use This Skill

The WooCommerce Code Review skill is a specialized tool designed to automate the auditing of code changes against official WooCommerce development standards. It systematically checks PHP backend architecture, naming conventions, documentation requirements, and data integrity. Beyond technical code, it also enforces UI copy guidelines to ensure consistency across the merchant experience. By providing specific citations and actionable fixes, it helps developers maintain high-quality, standardized codebases during local development or automated PR reviews.

Use Cases

  • Automated Pull Request Reviews: Integrate the skill into your CI/CD workflow to automatically flag violations in architecture, naming, and testing standards before merging code.
  • Local Code Quality Audits: Use the skill during the development phase to catch common mistakes like camelCase usage, missing @since annotations, or improper dependency injection.
  • UI Copy Standardization: Ensure all user-facing strings follow sentence-case requirements and brand guidelines to maintain a professional and consistent interface.
  • Unit Test Validation: Verify that test suites follow specific naming conventions and include required documentation like @testdox and proper SUT variable usage.
  • Architectural Compliance: Identify structural issues such as standalone functions or classes placed outside the recommended directory structure to ensure long-term maintainability.
namewoocommerce-code-review
descriptionReview WooCommerce code changes for coding standards compliance. Use when reviewing code locally, performing automated PR reviews, or checking code quality in WooCommerce projects.

WooCommerce Code Review

Review code changes against WooCommerce coding standards and conventions.

Critical Violations to Flag

Backend PHP Code

Consult the woocommerce-backend-dev skill for detailed standards. Using these standards as guidance, flag these violations and other similar ones:

Architecture & Structure:

Naming & Conventions:

Documentation:

  • Missing @since annotations - Required for public/protected methods and hooks (code-entities.md)
  • Missing docblocks - Required for all hooks and methods (code-entities.md)
  • Verbose docblocks - Keep concise, one line is ideal (code-entities.md)

Data Integrity:

  • Missing validation - Must verify state before deletion/modification (data-integrity.md)

Testing:

  • Using $instance in tests - Must use $sut variable name (unit-tests.md)
  • Missing @testdox - Required in test method docblocks (unit-tests.md)
  • Test file naming - Must follow convention for includes/ vs src/ (unit-tests.md)

UI Text & Copy

Consult the woocommerce-copy-guidelines skill. Flag:

  • Title Case in UI - Must use sentence case (sentence-case.md)
    • Wrong: "Save Changes", "Order Details", "Payment Options"
    • Correct: "Save changes", "Order details", "Payment options"
    • Exceptions: Proper nouns (WooPayments), acronyms (API), brand names

Review Approach

  1. Scan for critical violations listed above
  2. Cite specific skill files when flagging issues
  3. Provide correct examples from the skill documentation
  4. Group related issues for clarity
  5. Be constructive - explain why the standard exists when relevant

Output Format

For each violation found:

[Issue Type]: [Specific problem]
Location: [File path and line number]
Standard: [Link to relevant skill file]
Fix: [Brief explanation or example]

Notes

  • All detailed standards are in the woocommerce-backend-dev, woocommerce-dev-cycle, and woocommerce-copy-guidelines skills
  • Consult those skills for complete context and examples
  • When in doubt, refer to the specific skill documentation linked above