dokan-code-review

Review Dokan PHP code and pull requests for coding standards and security.

286|214|Updated Jan 31, 2017
One-click install
npx skills add https://github.com/getdokan/dokan --skill dokan-code-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dokan-code-review
Source: https://github.com/getdokan/dokan/tree/main/.claude/skills/dokan-code-review
Command: npx skills add https://github.com/getdokan/dokan --skill dokan-code-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Review Dokan code changes and pull requests for coding standards, security practices, and architectural compliance. Use when reviewing PRs, performing code audits, or checking code quality.

Core Features & Use Cases

  • Architecture & Structure: REST controllers must extend Dokan base controllers and use prepare_item_for_response, not WP_REST_Controller directly.
  • Naming & Conventions: Enforce snake_case methods/variables, proper namespaces under WeDevs\Dokan, and dokan-lite text domain; ensure dokan_ prefix on all hooks.
  • Security: Require permission callbacks on all REST routes, sanitize inputs, escape outputs, and use prepared statements for dynamic SQL.
  • Documentation: Require @since tags and PHPDoc on methods/hooks/filters.

Quick Start

Run a review of a Dokan PR focusing on REST patterns, security callbacks, and naming conventions.

Frequently Asked Questions about dokan-code-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a Dokan pull request for security and coding standards?

To review a Dokan pull request for security and coding standards, audit PHP code for REST endpoint permission callbacks, input sanitization, output escaping, and proper hook prefixes. It enforces architectural consistency by requiring REST controllers to extend Dokan base controllers and use prepare_item_for_response.

What security practices should I check in WordPress REST API endpoints for Dokan?

Security practices for WordPress REST API endpoints in Dokan require permission callbacks on all routes, sanitizing inputs, escaping outputs, and using prepared statements for dynamic SQL. The code review process identifies missing security callbacks and verifies proper data sanitization across Dokan domains.

How do I enforce PHP naming conventions and namespaces in Dokan code?

Enforce PHP naming conventions in Dokan code by checking for snake_case methods and variables, proper namespaces under WeDevs\Dokan, and the dokan-lite text domain. The review also ensures a dokan_ prefix on all hooks and requires @since tags with PHPDoc on methods, hooks, and filters.

Does Dokan code review require REST controllers to extend WP_REST_Controller directly?

Dokan code review does not allow REST controllers to extend WP_REST_Controller directly. Architecture and structure rules mandate that REST controllers must extend Dokan base controllers and implement prepare_item_for_response to maintain architectural consistency across the plugin.

When do I need a code audit for my Dokan plugin changes?

You need a code audit for Dokan plugin changes when reviewing pull requests, performing code quality checks, or verifying architectural compliance. It identifies missing PHPDoc, improper naming conventions, and security vulnerabilities like unsanitized inputs or missing permission callbacks in PHP backend code.