A powerful WordPress plugin that profiles every action and filter hook to identify performance bottlenecks and measure execution time by plugin.
- Comprehensive Hook Profiling: Measures execution time of all WordPress actions and filters
- Plugin Attribution: Identifies which plugin or theme owns each callback
- Real-time Performance Data: Live profiling with minimal overhead
- Interactive Debug Panel: Rich interface with sorting, filtering, and detailed breakdowns
- Multiple Views:
- Plugins overview with total execution times
- Slowest callbacks identification
- Hook-by-hook detailed analysis
- Copy the
wp-hook-profilerdirectory to your WordPresswp-content/plugins/directory - Or upload the zip on the Add Plugin page.
- Activate the plugin through the WordPress admin or network admin (for multisite)
- The profiler will automatically start collecting data
Once activated, you'll see a new "Hooks" indicator in your admin bar showing:
- Total number of hooks executed
- Total execution time
Click the admin bar item to open the detailed profiling panel.
The debug panel provides three main views:
- Shows total execution time per plugin
- Displays hook count and callback count
- Calculates average execution time per callback
- Sortable and searchable
- Lists individual callbacks by execution time
- Shows which hook and plugin each callback belongs to
- Helps identify specific performance bottlenecks
- Groups callbacks by hook name
- Shows total time per hook
- Allows filtering by plugin
- Detailed breakdown of each hook's callbacks
The profiler is designed to have minimal impact on your site's performance. But it is only recommended to have it active while actively testing. Deactivate it once done.
- Hook Interception: Uses WordPress's
allhook to intercept every action and filter - Timing Measurement: Records start and end times for each hook execution
- Callback Attribution: Uses PHP reflection to identify the source file and plugin for each callback
- Data Aggregation: Processes timing data to provide meaningful insights
WP_Hook_Profiler_Engine: Core profiling logic and timing measurementWP_Hook_Profiler_Plugin_Detector: Identifies plugin ownership of callbacks- Interactive frontend with AJAX data loading
- Responsive CSS interface with sorting and filtering
- WordPress 5.0+
- PHP 7.4+
- User must have
manage_optionscapability to view profiling data
- Only users with
manage_optionscapability can access profiling data - AJAX requests are nonce-protected
- No data is stored permanently - all profiling data is session-based
- Ensure you have sufficient permissions (
manage_optionscapability) - Check that JavaScript is enabled in your browser
- Verify that AJAX requests are working (check browser console for errors)
- The profiler stores timing data in memory during page execution
- For sites with many hooks, consider using only when needed
- Deactivate the plugin when not actively profiling
- The profiler adds minimal overhead but does measure every hook
- Use primarily in development/staging environments
- The estimated overhead is displayed in the profiling panel
This plugin is designed for development and debugging purposes. Feel free to extend or modify it for your specific profiling needs.
GPL v2 or later