Terminal
Terminal/Skill
Pre-release audit of a WooCommerce plugin's dead code, duplication, complexity, and data paths, run after code review before shipping.
By Automattic
Works with
npx skills add automattic/claude-woocommerce-toolkit --skill woocommerce-finalizeYou are performing a pre-release code health and traceability audit of a WooCommerce plugin. This skill focuses on structural concerns that static checklists do not catch.
This skill runs after code review. UX compliance and security auditing are handled by separate review checklists. Do not duplicate that work here.
Read these before starting -- they define the standards you are auditing against:
references/coding-standards.md -- WordPress PHP coding standards, naming, structurereferences/security.md -- Security baseline, database patternsreferences/woocommerce-apis.md -- HPOS, CRUD, data stores, payment gateway patternsreferences/ux-guidelines.md -- UX/copy conventionsThis skill runs two review tracks, then synthesizes findings into a machine-readable task list.
The two tracks:
Plugin Name: header)Finalization should not begin until tests pass. If a testing report exists in the
plugin root (testing-report.md), verify:
If no testing report exists, recommend the user run their test suite first.
Sweep the entire codebase for structural and maintenance issues that accumulate over time and are not caught by standards enforcement during development.
use statements, and variablesreturn, throw, exit, dieFor each finding: category, file/line, impact description, suggested fix.
Severity:
| Issue | Level |
|---|---|
| Unreachable code hiding a bug | High |
| God class / circular dependency | High |
| >80% duplicated logic across files | Medium |
| Functions >50 lines | Medium |
| Commented-out code blocks | Low |
| Unused private methods | Low |
Trace every UI interaction through the full stack:
UI (HTML/JS) -> AJAX/REST Handler -> Business Logic -> Data Access -> Database
For each layer boundary:
These specific paths must be fully traced if the plugin is a payment gateway:
checkout form (JS) -> process_payment() -> payment API call -> webhook/IPN handler -> order status updateadmin refund button -> process_refund() -> refund API call -> order note + statussettings form (admin) -> process_admin_options() / save -> get_option() -> checkout form displaytokenize (JS/API) -> WC_Payment_Token creation -> saved token display -> token reuse at checkoutincoming webhook -> signature verification -> event routing -> order lookup -> status updateFor each path: document the full chain of calls, flag any broken links, missing error handling, or data that crosses a boundary without validation.
Report: verified paths, broken paths, suspicious paths.
finalization-tasks.mdMachine-readable task list for agents or developers:
# Finalization Tasks for [Plugin Name]
## Critical Priority
### TASK-OPT-001: [Brief description]
- **File:** [path]
- **Lines:** [N-M]
- **Issue:** [What's wrong]
- **Fix:** [What to do, with before/after code]
- **Status:** [ ] Not started
## High Priority
### TASK-TRC-001: [Brief description]
...
Task ID scheme: TASK-OPT-### (code health), TASK-TRC-### (traceability).
finalization-tasks.md to the plugin's output folder