Descripció
HookTrace is a developer observability tool that records and visualizes the runtime execution order of WordPress hooks, filters, and plugin initialization for a single page request.
For Developers Only
This plugin is designed exclusively for development and staging environments. It helps developers understand:
- Which hooks fired, in what order
- Which callbacks executed on each hook
- Callback priority and execution time
- Source plugin, theme, or core location
- Exact file and line number
- Plugin and theme load timeline
Key Features:
- Hook List Tracking – Records all hooks that fire during a page request with type and source information
- Detailed Callback Inspection – When a hook is selected, displays comprehensive callback information including priority, execution order, duration, file path, and source
- Modern Modal UI – Beautiful, searchable interface with filtering capabilities
- Zero Performance Impact – In-memory storage only, no database writes
- Early Boot Support – MU-plugin bootstrap captures hooks from the very beginning
Requirements:
WP_DEBUGmust be set totrueinwp-config.php- User must have
manage_optionscapability (administrator) - PHP 8.0 or higher
Safety Features:
- Automatically disables when
WP_DEBUGis false - Never runs for non-admin users
- Never modifies WordPress behavior
- Observational only – no code execution changes
Captures
Instal·lació
- Upload the
hooktracefolder to/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- Ensure
WP_DEBUGis set totruein yourwp-config.phpfile - (Optional) For early hook capture, copy
hooktrace-bootstrap.phpfrom the plugin directory to/wp-content/mu-plugins/
PMF
-
Does this plugin work in production?
-
No. This plugin is designed exclusively for development and staging environments. It requires
WP_DEBUGto be enabled and will automatically disable itself ifWP_DEBUGis false. -
Will this slow down my site?
-
The plugin is designed with minimal overhead (5-10ms average). However, it should only be used in development/staging environments where performance is not critical.
-
Do I need to install the MU-plugin bootstrap?
-
The MU-plugin bootstrap is optional but recommended. It allows the plugin to capture hooks from the very beginning of WordPress initialization, including must-use plugins and early core hooks.
-
Can I use this to debug plugin conflicts?
-
Yes! The timeline view shows which hooks fire and which plugins are registering callbacks, making it easier to identify conflicts and execution order issues.
-
Does this modify WordPress behavior?
-
No. This plugin is purely observational. It never modifies hook execution, suppresses errors, or changes WordPress behavior in any way.
-
What data is stored?
-
No data is stored. All trace information is kept in memory for the current request only and is discarded after the page loads.
-
How do I inspect a specific hook?
-
Click on any hook in the list to see detailed information about all callbacks registered for that hook, including priority, execution order, duration, and source file location.
Ressenyes
Col·laboradors i desenvolupadors
«HookTrace – Trace Hooks with Precision» és programari de codi obert. La següent gent ha col·laborat en aquesta extensió.
Col·laboradorsTraduïu «HookTrace – Trace Hooks with Precision» a la vostra llengua.
Interessats en el desenvolupament?
Navegueu pel codi, baixeu-vos el repositori SVN, o subscriviu-vos al registre de desenvolupament per fisl de subscripció RSS.
Registre de canvis
1.0.0
- Initial release
- Hook list tracking (all hooks that fire)
- Detailed callback inspection for selected hooks
- Modern modal UI with search and filtering
- Admin bar integration
- MU-plugin bootstrap support
- Color-coded badges for source and type identification
- Responsive design with smooth animations






