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.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. 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

Good fit 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.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/mralaminahamed/wp-dev-skills
agentmods
npx agentmods add skills/mralaminahamed/wp-dev-skills/wp-plugin-testing

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wp-plugin-testing

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.5 $0.00136 $0.01433
Sonnet 5.5 $0.00068 $0.00716
Haiku 4.5 $0.00034 $0.00358

Measured 1mo ago against content hash 18ec7f58b286, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (28 stars, last pushed 3mo ago), licensed MIT. It adds 340 tokens to every session and 3,582 once invoked, about $0.0014 per session on Opus 5.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

test-master

Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines. Use when writing unit tests, integration tests, or E2E tests; creating test strategies or automation…

Jeffallan/claude-skills · 104 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. Trigger on "what should we test", "our test suite is slow and flaky", "unit or integration test", "what…

nimadorostkar/Claude-Skills-collection · 106 tokens

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

ios-testing

Invoke any time a user is writing iOS/Swift tests or asking why tests behave a certain way — including XCTest versus Swift Testing (@Test/#expect) choices, async ViewModel tests with @Observable or @Published, snapshot testing across device sizes, mocking protocols for dependency injection, setUp/tearDown lifecycle…

rusel95/ios-agent-skills · 134 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

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