Code Review

Enforce WooCommerce coding standards and catch critical violations

✨ The solution you've been looking for

Verified
Tested and verified by our team
36895 Stars

Code review assistance with linting, style checking, and best practices

code-review woocommerce php standards quality-assurance linting best-practices wordpress
Repository

See It In Action

Interactive preview & real-world examples

Live Demo
Skill Demo Animation

AI Conversation Simulator

See how users interact with this skill

User Prompt

Review this PHP class for WooCommerce coding standards compliance

Skill Processing

Analyzing request...

Agent Response

Detailed list of violations with specific fixes and references to coding standards

Quick Start (3 Steps)

Get up and running in minutes

1

Install

claude-code skill install code-review

claude-code skill install code-review
2

Config

3

First Trigger

@code-review help

Commands

CommandDescriptionRequired Args
@code-review pre-commit-code-reviewReview local code changes before committing to catch standards violations earlyNone
@code-review pull-request-reviewAutomated review of PR changes against WooCommerce conventionsNone
@code-review ui-text-validationVerify user interface copy follows WooCommerce style guidelinesNone

Typical Use Cases

Pre-commit Code Review

Review local code changes before committing to catch standards violations early

Pull Request Review

Automated review of PR changes against WooCommerce conventions

UI Text Validation

Verify user interface copy follows WooCommerce style guidelines

Overview

Code Review Skill

You now have expertise in conducting comprehensive code reviews. Follow this structured approach:

Review Checklist

1. Security (Critical)

Check for:

  • Injection vulnerabilities: SQL, command, XSS, template injection
  • Authentication issues: Hardcoded credentials, weak auth
  • Authorization flaws: Missing access controls, IDOR
  • Data exposure: Sensitive data in logs, error messages
  • Cryptography: Weak algorithms, improper key management
  • Dependencies: Known vulnerabilities (check with npm audit, pip-audit)
1# Quick security scans
2npm audit                    # Node.js
3pip-audit                    # Python
4cargo audit                  # Rust
5grep -r "password\|secret\|api_key" --include="*.py" --include="*.js"

2. Correctness

Check for:

  • Logic errors: Off-by-one, null handling, edge cases
  • Race conditions: Concurrent access without synchronization
  • Resource leaks: Unclosed files, connections, memory
  • Error handling: Swallowed exceptions, missing error paths
  • Type safety: Implicit conversions, any types

3. Performance

Check for:

  • N+1 queries: Database calls in loops
  • Memory issues: Large allocations, retained references
  • Blocking operations: Sync I/O in async code
  • Inefficient algorithms: O(n^2) when O(n) possible
  • Missing caching: Repeated expensive computations

4. Maintainability

Check for:

  • Naming: Clear, consistent, descriptive
  • Complexity: Functions > 50 lines, deep nesting > 3 levels
  • Duplication: Copy-pasted code blocks
  • Dead code: Unused imports, unreachable branches
  • Comments: Outdated, redundant, or missing where needed

5. Testing

Check for:

  • Coverage: Critical paths tested
  • Edge cases: Null, empty, boundary values
  • Mocking: External dependencies isolated
  • Assertions: Meaningful, specific checks

Review Output Format

 1## Code Review: [file/component name]
 2
 3### Summary
 4[1-2 sentence overview]
 5
 6### Critical Issues
 71. **[Issue]** (line X): [Description]
 8   - Impact: [What could go wrong]
 9   - Fix: [Suggested solution]
10
11### Improvements
121. **[Suggestion]** (line X): [Description]
13
14### Positive Notes
15- [What was done well]
16
17### Verdict
18[ ] Ready to merge
19[ ] Needs minor changes
20[ ] Needs major revision

Common Patterns to Flag

Python

 1# Bad: SQL injection
 2cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
 3# Good:
 4cursor.execute("SELECT * FROM users WHERE id = ?", (user_id,))
 5
 6# Bad: Command injection
 7os.system(f"ls {user_input}")
 8# Good:
 9subprocess.run(["ls", user_input], check=True)
10
11# Bad: Mutable default argument
12def append(item, lst=[]):  # Bug: shared mutable default
13# Good:
14def append(item, lst=None):
15    lst = lst or []

JavaScript/TypeScript

 1// Bad: Prototype pollution
 2Object.assign(target, userInput)
 3// Good:
 4Object.assign(target, sanitize(userInput))
 5
 6// Bad: eval usage
 7eval(userCode)
 8// Good: Never use eval with user input
 9
10// Bad: Callback hell
11getData(x => process(x, y => save(y, z => done(z))))
12// Good:
13const data = await getData();
14const processed = await process(data);
15await save(processed);

Review Commands

 1# Show recent changes
 2git diff HEAD~5 --stat
 3git log --oneline -10
 4
 5# Find potential issues
 6grep -rn "TODO\|FIXME\|HACK\|XXX" .
 7grep -rn "password\|secret\|token" . --include="*.py"
 8
 9# Check complexity (Python)
10pip install radon && radon cc . -a
11
12# Check dependencies
13npm outdated  # Node
14pip list --outdated  # Python

Review Workflow

  1. Understand context: Read PR description, linked issues
  2. Run the code: Build, test, run locally if possible
  3. Read top-down: Start with main entry points
  4. Check tests: Are changes tested? Do tests pass?
  5. Security scan: Run automated tools
  6. Manual review: Use checklist above
  7. Write feedback: Be specific, suggest fixes, be kind

What Users Are Saying

Real feedback from the community

Environment Matrix

Dependencies

PHP 7.4+
WordPress development environment
WooCommerce codebase access

Framework Support

WordPress ✓ (required) WooCommerce ✓ (required)

Context Window

Token Usage ~3K-8K tokens for typical file reviews

Security & Privacy

Information

Author
agno-agi
Updated
2026-01-30
Category
automation-tools