Ready to get started?Download WordPress


P3 (Plugin Performance Profiler)
[resolved] Feature request: Blacklist pages to check in scan (5 posts)

  1. edwardra3
    Posted 1 year ago #

    I have a fair number of plugins that only run on on the admin page and they throw off my load times shown in the scan. It would be nice to have the option not to scan /wp-admin and any sub pages so I can get a better feel for how my plugins are affecting load times of users, instead of load times of myself.


  2. Kurt Payne
    Posted 1 year ago #

    You can control this with a filter in P3 version 1.4. Something like this should work (untested):

    function my_p3_auto_scan_pages( $urls ) {
        foreach ( $urls as $k => $v ) {
            if ( false !== strpos( $v, '/wp-admin' ) {
                unset( $urls[ $k ] );
        return $urls;
    add_filter( 'p3_automatic_scan_urls', 'my_p3_auto_scan_pages', 10, 2 );
  3. edwardra3
    Posted 1 year ago #

    Thanks. Which file should that go in? The plugin has 30 files!

  4. Kurt Payne
    Posted 1 year ago #

    Hi edwardra3,

    Please don't edit P3 directly :-)

    You can create a new plugin named p3-customizer.php with source code similar to this:

    Then upload it to wp-content/plugins and activate it like a normal plugin.

  5. edwardra3
    Posted 1 year ago #

    Ah thanks.

    I'm getting an error:
    Parse error: syntax error, unexpected '=', expecting ')' in blah-blah-blaj/p3-customizer.php on line 13

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.