OPTIMIZATION PRO

Find Slow Callbacks

Profile any page on your site to find the slowest WordPress hook callbacks, identifying exactly which plugin or theme function is causing delays.

What It Does

Find Slow Callbacks lets you test any URL on your site and see exactly which WordPress action/filter callbacks are slowest. It works by deploying an MU-plugin that wraps every callback with timing code, making a test request to your chosen URL, then collecting and displaying the results sorted by execution time. This tells you which specific plugin functions are bottlenecks on any given page.

Features

  • Test any URL on your site — homepage, admin pages, WooCommerce checkout, specific posts
  • MU-plugin-based profiler that times every hook callback during the test request
  • Configurable minimum time threshold (default 10ms) to filter out fast callbacks and focus on slow ones
  • Results show callback name, hook name, execution time, and source file location
  • Session history — previous profiling results are saved in the database for comparison
  • Loopback detection with automatic fallback to localhost for Docker and containerized environments
  • Handles SSL, redirects, and firewall issues with clear error messages
  • DataStar SSE streaming for real-time progress updates during profiling
  • Repair Setup button to reinstall the MU-plugin and database table if something goes wrong
  • Session management — view, delete individual sessions, or clear all history
  • Automatic MU-plugin version sync — updates the profiler when the plugin is updated

How to Use

  1. Enable the module

    Toggle on "Find Slow Callbacks" in the WP Multitool dashboard. The module deploys an MU-plugin (wp-multitool-callback-profiler.php) that handles the actual profiling.

  2. Enter a URL to test

    Go to WP Multitool > Find Slow Callbacks. Enter any URL on your site that you want to profile. The URL must be on the same domain.

  3. Set the minimum time threshold

    The default is 10ms. Increase it to 50ms or 100ms if you only want to see the biggest bottlenecks. Lower it to 1ms for a comprehensive view.

  4. Run the test

    Click "Start Test". The module makes an HTTP request to your URL with profiling enabled, then streams results back via SSE. This typically takes 5-30 seconds depending on the page complexity.

  5. Analyze the results

    Results are sorted by execution time. Look for callbacks from specific plugins or themes that take the most time. The source file path helps identify which plugin owns each callback.

  6. Take action

    Based on the results, you can deactivate slow plugins, contact plugin authors, or look for lighter alternatives. Previous sessions are saved for before/after comparison.

Settings

SettingDefaultDescription
Test URL Site homepage The URL to profile. Must be on the same domain as your WordPress installation.
Minimum Time (ms) 10 Only show callbacks that took longer than this threshold in milliseconds.
Incremental Mode Off When enabled, shows results incrementally as they are collected rather than all at once.

FAQ

Why is this module disabled by default?

It installs an MU-plugin (wp-multitool-callback-profiler.php) that hooks into callback execution. While the profiler only activates during explicit test sessions (triggered by a secret token), the MU-plugin file itself loads on every request. The overhead when not profiling is negligible, but we leave the decision to enable it to you.

The profiler says "MU-plugin not installed"

Click the "Repair Setup" button on the module page. This reinstalls the MU-plugin and recreates the database table. If that fails, check that WordPress has write access to the wp-content/mu-plugins/ directory.

The test times out or shows "Cannot reach test URL"

This usually means your hosting blocks loopback HTTP requests (the server cannot make requests to itself). The module tries a localhost fallback automatically, but some restrictive hosts block that too. Check with your host if wp_remote_get to your own site URL works.

How accurate is the timing data?

Reasonably accurate for identifying bottlenecks. The profiler uses microtime(true) around each callback, which gives microsecond precision. However, system load, database latency, and other factors can cause variation between runs. Run the test multiple times for a reliable picture.

Does profiling affect my visitors?

No. The profiler only activates when a request includes a specific one-time token. Normal visitor requests are not profiled. The token is generated per session and expires after 2 minutes.

Ready to optimize your WordPress site?

Join developers using WP Multitool to debug, optimize, and maintain WordPress.

Get WP Multitool