Title: Plugin load time too high
Last modified: August 31, 2016

---

# Plugin load time too high

 *  Resolved [Gone South](https://wordpress.org/support/users/gone-south/)
 * (@gone-south)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-load-time-too-high/)
 * Hello Hardeep,
 * In an effort to keep site load time close to Google guidelines, I run P3 to see
   how much time my plugins are taking.
 * I was surprised to see Custom Login Page Customizer taking 0.3632 seconds. That’s
   the second largest time consuming plugin out of 34, exceeded only by a database-
   intensive plugin. The P3 result has been consistent over a few months.
 * Is this to be expected from Custom Login? Is there a fix?
 * Thanks.
 * [https://wordpress.org/plugins/login-customizer/](https://wordpress.org/plugins/login-customizer/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Hardeep Asrani](https://wordpress.org/support/users/hardeepasrani/)
 * (@hardeepasrani)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/plugin-load-time-too-high/#post-7138624)
 * Hey there,
 * It’s kind of a weird thing because the login customizer doesn’t affect your front-
   page at all. It only appears when you try to customize your login page.
 * And apart from all of that, it doesn’t add anything which WordPress already doesn’t
   have. The plugin is built entirely using Customizer API provided by WordPress,
   which every theme uses and there’s nothing custom in it so I really don’t have
   any idea what we can do to prevent it.
 * Here’s something you can try and see if it works. Make sure that you’re using
   FTP:
 * Visit /wp-content/plugins/login-customizer/login-customizer.php, and look for
   the following line of code:
 * `include( LOGINCUST_FREE_PATH . 'customizer.php' );`
 * And replace it with:
 *     ```
       if ( is_customize_preview() || is_login_page() ) {
       	include( LOGINCUST_FREE_PATH . 'customizer.php' );
       }
       ```
   
 * And run the test after that and see if it improves the loading time. Don’t forget
   to let me know the results.
 * Thank you. 🙂
 * Regards,
    Hardeep
 *  Thread Starter [Gone South](https://wordpress.org/support/users/gone-south/)
 * (@gone-south)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/plugin-load-time-too-high/#post-7138635)
 * Hi Hardeep,
 * I copied and pasted the code as instructed and got this reply when I tried to
   run the scan:
 * Fatal error: Call to undefined function is_login_page() in /home/content/p3pnexwpnas08_data02/
   34/2479434/html/wp-content/plugins/login-customizer/login-customizer.php on line
   41
 *  Plugin Author [Hardeep Asrani](https://wordpress.org/support/users/hardeepasrani/)
 * (@hardeepasrani)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/plugin-load-time-too-high/#post-7138637)
 * Sorry I forgot something. You also need to include there:
 *     ```
       function is_login_page() {
           return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'));
       }
       ```
   
 * Add add it before the above code. 🙂
 *  Thread Starter [Gone South](https://wordpress.org/support/users/gone-south/)
 * (@gone-south)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/plugin-load-time-too-high/#post-7138642)
 * Hello Hardeep,
 * The changes were accepted and I ran the scan. It still produces a run time of
   0.3632 seconds (unchanged).
 * Eric
 *  Plugin Author [Hardeep Asrani](https://wordpress.org/support/users/hardeepasrani/)
 * (@hardeepasrani)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/plugin-load-time-too-high/#post-7138643)
 * Hi Eric,
 * That’s really weird because now the plugin isn’t loading 90% of its code unless
   it’s the login page. :/
 *  Thread Starter [Gone South](https://wordpress.org/support/users/gone-south/)
 * (@gone-south)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/plugin-load-time-too-high/#post-7138644)
 * Hello Hardeep,
 * I’ve re-run the P3 scan. Custom Login Page Customizer now takes 0.1449 seconds.
   That’s less than half the previous number, although it’s still pretty slow for
   such a basic plugin. It’s also still No. 2 on time consumption on our site, out
   of 34 active plugins.
 * Since most of the code isn’t loading unless the login page is open, could it 
   be something about the P2 Plugin Profiler?
 * Thanks for the help.
 *  Plugin Author [Hardeep Asrani](https://wordpress.org/support/users/hardeepasrani/)
 * (@hardeepasrani)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/plugin-load-time-too-high/#post-7138650)
 * Hi,
 * I’m not sure about how P2 Plugin Profiler works and heard its name for the first
   time on this thread so don’t know about that. But maybe it could be a factor,
   like how it measures it.
 * Maybe you can try something else to see if they also report this plugin being
   the second lowest. 🙂
 * Regards,
    Hardeep

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Plugin load time too high’ is closed to new replies.

 * ![](https://ps.w.org/login-customizer/assets/icon-256x256.png?rev=2455454)
 * [Custom Login Page Customizer](https://wordpress.org/plugins/login-customizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/login-customizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/login-customizer/)
 * [Active Topics](https://wordpress.org/support/plugin/login-customizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/login-customizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/login-customizer/reviews/)

## Tags

 * [load time](https://wordpress.org/support/topic-tag/load-time/)

 * 7 replies
 * 2 participants
 * Last reply from: [Hardeep Asrani](https://wordpress.org/support/users/hardeepasrani/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/plugin-load-time-too-high/#post-7138650)
 * Status: resolved