wp-plugin-testing

wp-plugin-testing is a skill for Claude Code from mralaminahamed/wp-dev-skills. It costs 340 tokens per session (3,582 once invoked), scanned A, original, MIT.

A skill for creating automated tests for WordPress plugins using unit tests, WordPress integration tests, or browser-based acceptance tests. TDD means developing with tests that describe expected behavior, and PHPUnit is a PHP testing framework.

In plain words
What is it for?
Use it to scaffold plugin tests, test hooks, filters, AJAX handlers, and plugin functions, configure the WordPress test suite, use mocks, write end-to-end tests, and run tests in CI.
Why use it?
It helps choose the appropriate test type and set up the WordPress test environment, mocks, fixtures, test commands, and continuous-integration checks.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is bash bin/install-wp-tests.sh wordpress_test root '' localhost latest.

Part of the wp-dev-skills plugin — 19 skills, 1 command shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add mralaminahamed/wp-dev-skills
Claude Code
/plugin install wp-dev-skills

Made for: Claude Code.

Or install wp-dev-skills, the plugin that ships this one along with the rest of its 19 skills, 1 command.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wp-plugin-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/mralaminahamed/wp-dev-skills/wp-plugin-testing.svg)](https://agentmods.dev/skills/mralaminahamed/wp-dev-skills/wp-plugin-testing)
Your own site
<a href="https://agentmods.dev/skills/mralaminahamed/wp-dev-skills/wp-plugin-testing"><img src="https://agentmods.dev/badge/skills/mralaminahamed/wp-dev-skills/wp-plugin-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 340 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,582 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00340 $0.03582
Opus 5 $0.00170 $0.01791
Sonnet 5 $0.00068 $0.00716
Haiku 4.5 $0.00034 $0.00358

Measured 6d ago against content hash 18ec7f58b286, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

wp-plugin-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/wp-plugin-testing/SKILL.md · 370 lines

How it starts

The opening of the file, as written. The whole thing — 370 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WordPress Plugin Testing

Model note: Bootstrap and CI config setup are mechanical (haiku). Writing meaningful test cases (choosing fixtures, mocking the right layer, testing edge cases) requires understanding the plugin's code — use sonnet. Redirect/exit harness setup is a one-time pattern and works on haiku.

Set up and write automated tests for WordPress plugins: PHPUnit integration tests (real WP + DB), pure unit tests (no WP loaded), and acceptance/E2E tests with Codeception.

When to use

  • "Set up PHPUnit tests for my plugin", "bootstrap a WP test suite", "scaffold plugin tests".
  • "Write a unit test for this function", "mock WordPress functions without loading WP".
  • "Set up Codeception / wp-browser", "write acceptance tests".
  • "Test a hook callback", "assert a filter changes the output", "test AJAX handlers".
  • "Add tests to CI", "run tests on GitHub Actions".

Not for: PHPStan static analysis — use the official wp-phpstan skill. Scaffolding a stubs package for a third-party library — use wp-phpstan-stubs. Debugging CI failures on an existing suite — use wp-ci-qa.

Method

1. Choose test type

Type Tool WP loaded DB Speed
Integration PHPUnit + WP test suite (WP_UnitTestCase) ✅ Full ✅ Real (temp) Slow
Unit PHPUnit + Brain\Monkey (recommended) or WP_Mock Fast
Acceptance Codeception + wp-browser ✅ Browser ✅ Real Slowest

Start with integration tests for hooks/filters; unit tests for pure business logic; acceptance only for critical user flows.

2. Integration test setup (WP test suite)

Install test suite:

# WP-CLI method (recommended)
wp scaffold plugin-tests my-plugin

# Manual — install WP test library
bash bin/install-wp-tests.sh wordpress_test root '' localhost latest

bin/install-wp-tests.sh creates a temp WP installation and the wordpress-tests-lib. Add tests/ dir to .gitignore if downloading WP inline, or commit the bootstrap only.

Read the full file on GitHub · 370 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 370 lines · 340 tokens per session scan A 18ec7f58b286

Subscribe to this mod's changes

wp-plugin-testing is a skill published in the GitHub repository mralaminahamed/wp-dev-skills (27 stars, last pushed 1mo ago), licensed MIT. It adds 340 tokens to every session and 3,582 once invoked, about $0.0017 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

req-to-test

Generates comprehensive test scenarios from requirements including BDD/Gherkin scenarios, unit tests, integration tests, and end-to-end test cases. Use when converting requirements, user stories, or specifications into testable scenarios with full coverage including happy paths, error cases, edge cases, and boundary…

ArabelaTso/Skills-4-SE · 71 tokens

test-strategy

Use when deciding what to test and at which level. Covers the test pyramid, what belongs in unit versus integration versus end-to-end tests, coverage as a signal rather than a target, and eliminating flakiness.

nimadorostkar/Claude-Skills-collection · 47 tokens

test-strategy-document

Create a production-ready Testing Strategy and QA Execution Plan. Covers testing levels (unit, integration, E2E, performance), mocking boundaries, test environment matrix, code coverage thresholds, and automated CI pipeline runsheets. Use when establishing a QA framework for a new system or feature set.

fattain-naime/engineering-docs · 62 tokens

writing-tests

Write unit, integration, and E2E tests that follow the testing pyramid, the Arrange-Act-Assert pattern, the shouldXwhenY naming convention, and meet a 75% (target 80%) branch coverage gate per supported OS. Use when the user asks to write tests, add coverage, build a test suite, fix flaky tests, or verify a feature…

Cristhianzl/claude-skills-czl · 103 tokens

test-writing

Write comprehensive tests for code including unit tests, integration tests, and end-to-end tests. Use this to ensure code quality, catch bugs, and validate functionality.

KarmaloopAI/Jiva · 35 tokens

testing-strategy

Test strategy and quality engineering — the test pyramid, what to test at each layer, meaningful coverage policy, integration and contract testing, E2E for critical journeys, test data and fixtures, flaky-test control, mutation testing, load and security testing, and CI gating. Use when the user says "tests"…

Kin9Zeus/senior-engineer-skills · 156 tokens