[resolved] Register Plus and 9 MySQL calls to every page on my site (8 posts)

  1. revilo78
    Posted 6 years ago #

    I think the Register Plus plugin is great, but is there any way I can get it to run only at the registration page. The reason I ask is that I noticed the plugin added an extra 9 MySQL calls to every page on my site. I’m trying to speed up my site and I don’t need the plugin to run at my home page or my post page for example. Any help would be appreciated. Thanks.

  2. Dgold
    Posted 6 years ago #

    I don't know the answer to exactly what you're asking. But let me turn the question this way, if you're trying to "speed up" your site, diagnose the effect of this plugin like this:

    How fast does your site load with the plugin activated?

    How much faster does it run with the plugin completely deactivated?

    I would guess the difference in time is imperceptible, probably a small fraction of a second. I believe MySQL can handle lots of queries in a less than 1 second. I don't think this is likely to be a major factor in the speed of your site loading. Yes I realize some speed-minded experts will recommend that you reduce the # of SQL queries, but I think this issue is over-rated.

    That said, 9 queries from 1 plugin does sound like too many, possibly a programming mistake, and unnecessarily taxing the MySQL, but probably not adding a lot of loading time.

    I agree Register Plus is a great plugin.

  3. revilo78
    Posted 6 years ago #

    I haven’t noticed any real slow down, but I think the extra MySQL calls could slow down my site if I ever get a lot of visitors at once. I don’t see any reason for the plugin to run unless its at the registration page (i.e wp-login.php).

  4. Dgold
    Posted 6 years ago #

    Yeah, you're probably right, it would get a lot more taxing if you get a spike in traffic. Good point. Hopefully a solution will come to light. Have you tried asking the plugin author directly thru their site?

  5. revilo78
    Posted 6 years ago #

    The support link from the author's site pointed here. I wonder if there is anyway to get a plugin to work only a specific page.

  6. bamaguy
    Posted 6 years ago #

    This should work, but requires editing wp-login.php

    Edit wp-login.php after:

    define('THIS_SCRIPT', 'login');

    Edit register-plus.php after:

    Plugin Name: Register Plus
    Plugin URI: http://skullbit.com/wordpress-plugin/register-plus/
    Description: <strong>WordPress 2.5+ ONLY.</strong> Enhance your Registration Page.  Add Custom Logo, Password Field, Invitation Codes, Disclaimer, Captcha Validation, Email Validation, User Moderation, Profile Fields and more.
    Author: Skullbit
    Version: 3.5.1
    Author URI: http://www.skullbit.com
    Place your language file within this plugin directory and name it "regplus-{language}.mo" replace {language} with your language value from wp-config.php
    See readme.txt

    if (THIS_SCRIPT == 'login' OR WP_ADMIN == 'TRUE') {

    Still in register-plus.php find:

    Add before it:

    This reduced my queries per page to 18 from 27 on every page and my register plus plugin still works.

    Maybe there is a way to do it without editing files but I'm not that good with wordpress.

  7. revilo78
    Posted 6 years ago #

    Perfect, thanks Bamaguy!

  8. joshposh
    Posted 6 years ago #

    I tried to add the code but I get a fatal error :(

Topic Closed

This topic has been closed to new replies.

About this Topic