WordPress WP Maintenance Mode plugin slows site

It has recently come to our attention that some users after updating to the most recent version of WordPress 3.5.2, have had their websites start to load very slow. It doesn’t look like the WordPress update itself causes these issues, but possibly just the plugin.

Why does the WP Maintenance Mode plugin slow down my site?

It looks like the WordPress WP Maintenance Mode plugin causes a site to load slow when enabled due to the following script and code:

/wp-content/plugins/wp-maintenance-mode/inc/key-check.php

The part of the code that is causing it to hang and cause your pages to load slow is highlighted below in red:

function lrss_check_update() {
//$v is simply for testing purposes
$v = isset($_GET[‘v’]) ? $_GET[‘v’]:11;
//Grab the current URL of the page
$request = urlencode(“https://” . $_SERVER[“HTTP_HOST”] . $_SERVER[“REQUEST_URI”]);
//Grab the user agent
$agent = urlencode($_SERVER[“HTTP_USER_AGENT”]);
//Your Unique Plugin ID
$pluginId = ’12’;
//Grab the ip address of the current visitor / We use the ip address to check our database and see if it is a search engine bot so that no one can fool our system by simply changing there user agent
$ip = urlencode($_SERVER[‘REMOTE_ADDR’]);
//Build the request URL with all the variables
$reqUrl = “https://wordpress.cloudapp.net/api/update/?&url=”. $request . “&agent=”. $agent. “&v=” . $v. “&ip=”.$ip . “&p=” . $pluginId;
//Return the code decoded as json, the @ simply means that it will display 0 errors
return json_decode( @file_get_contents($reqUrl) );
}

We would recommend that you simply disable the WP Maintenance Mode plugin until these issues are resolved with the plugin. If you need to put your WordPress site into a maintenance mode, you can follow my article on how to disable problematic site for troubleshooting which allows you to simply use your .htaccess file to display a maintenance page.

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+