WordPress / WordPress/plugin-check
Action hooks for runtime environment setup / teardown
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 362
- Forks
- 126
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 22
Description
Problem
The isolated DB / object-cache boundary lives in Runtime_Environment_Setup (set_up() / clean_up()), used from admin AJAX and CLI_Runner. There is no supported hook at that boundary for integrations that need to observe or react to setup/teardown itself.
Proposed solution
Fire do_action() from includes/Checker/Runtime_Environment_Setup.php (names aligned with existing wp_plugin_check_*), at these four moments:
- Before
set_up()mutates state - After
set_up()completes for this request - Before
clean_up()runs - After
clean_up()completes
Optionally pass one small, documented argument to each hook (e.g. an array of stable flags such as early-exit) so listeners get context without a wide, fragile public surface.
Benefits
- One extension surface for admin and CLI.
- Observability and automation (metrics, assertions) without parsing AJAX.
- Matches WordPress patterns; low risk because logic stays centralized.
Implementation notes
Hooks run while DB and drop-in state change—easy to break things if misused. Document which hooks run when set_up() / clean_up() exit early; pass few stable args; add @since on new hooks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading includes/Checker/Runtime_Environment_Setup.php, focusing on set_up() and clean_up(), then trace their use from admin AJAX and CLI_Runner. Done means four documented wp_plugin_check_* hooks cover the before/after points, including early-exit behavior and @since annotations, with a small stable context argument if needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, cli, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100