dr-robert-li/cowork-wordpress-expert/code-quality

Claude Code and agent skill by dr-robert-li/cowork-wordpress-expert

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Reviews WordPress code against WPCS standards, static analysis, architecture patterns, and error handling. Use when analyzing custom themes/plugins, checking coding standards, or reviewing code architecture.

Install

npx vskill@latest install dr-robert-li/cowork-wordpress-expert/code-quality

SKILL.md

The same SKILL.md was published earlier as dr-robert-li/cowork-wordpress-expert/code-quality.

Domain 2: Code Quality & Standards

2.1 WordPress Coding Standards (WPCS)

  • PHP code adheres to WordPress PHP Coding Standards
  • JavaScript follows WordPress JS Coding Standards
  • CSS follows WordPress CSS Coding Standards
  • HTML follows WordPress HTML Coding Standards
  • Yoda conditions used for comparisons (if ( true === $var ))
  • Proper indentation (tabs, not spaces for PHP; as per standard for JS/CSS)
  • PHPDoc blocks present for all functions, classes, methods, hooks
  • Text domain consistency for internationalization

2.2 Static Analysis

  • PHPCS with WordPress-Extra and WordPress-VIP-Go rulesets
  • PHPStan at level 6+ (ideally max) with WordPress extensions
  • Psalm analysis for type safety
  • ESLint for JavaScript with WordPress preset
  • Stylelint for CSS/SCSS

2.3 Architecture & Design Patterns

  • Proper use of WordPress hooks system (actions and filters) — no function overriding via copy-paste
  • Single Responsibility Principle in custom classes
  • Proper namespacing to avoid function/class name collisions
  • Autoloading via PSR-4 or WordPress-compatible patterns
  • Data validation at boundaries (input validation, output escaping)
  • Proper separation of concerns (business logic vs presentation)
  • No business logic in template files
  • Proper use of WordPress transients API for caching expensive operations
  • Custom post types and taxonomies registered correctly with appropriate capabilities
  • Options API used correctly (autoloaded only when necessary)

2.4 Error Handling

  • Try/catch blocks around operations that can fail (API calls, file operations, database)
  • WordPress error pattern: return WP_Error objects rather than false or exceptions for API boundaries
  • Error conditions handled gracefully — no white screens
  • Admin notices for recoverable errors
  • Logging for non-recoverable errors without exposing details to users

2.5 Deprecated & Removed Functions

  • No use of functions deprecated in current WordPress version
  • No use of PHP functions deprecated in current PHP version
  • No use of MySQL functions replaced by MySQLi/PDO
  • mysql_* functions completely absent
  • create_function() replaced with closures
  • each() replaced with foreach

Tool Usage: Code Quality Analysis Commands

WordPress Coding Standards
bash
# Install WordPress Coding Standards
composer require --dev wp-coding-standards/wpcs
# Run PHPCS with WordPress standards
phpcs --standard=WordPress /path/to/plugin-or-theme
# Run with specific rulesets
phpcs --standard=WordPress-Extra /path/to/plugin
phpcs --standard=WordPress-VIP-Go /path/to/plugin
Static Analysis Tools
bash
# PHPStan (static analysis)
composer require --dev phpstan/phpstan szepeviktor/phpstan-wordpress
phpstan analyse --level=max /path/to/src
# Psalm (type safety)
composer require --dev vimeo/psalm
psalm --init
psalm
# PHP Linting (syntax check)
find /path/to/plugin -name "*.php" -exec php -l {} \;
JavaScript and CSS
bash
# ESLint with WordPress preset
npm install --save-dev eslint @wordpress/eslint-plugin
eslint /path/to/js-files
# Stylelint for CSS
npm install --save-dev stylelint stylelint-config-wordpress
stylelint "**/*.css"

Security

  • Security scanPassed, 98 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dr-robert-li/cowork-wordpress-expert/code-quality/badge)](https://verified-skill.com/skills/dr-robert-li/cowork-wordpress-expert/code-quality)

Something wrong with this skill or its page? Tell us.