We recently noticed our website was performing poorly with pages taking between 15 and 20 seconds to load in.
After doing some performance tests we tracked the culprit down to the official WordPress MailChimp sign-up plugin.
As you can see from the image below, our home was taking 16seconds to load in.
The main problem was caused by a call from the MailChimp plugin and the mailchimp.php file.
You can see from the images below that this particular request was taking 3.03 seconds to resolve, slowing the entire page time.
Sometimes it can be up to 15 seconds depending on how loaded the server is.
So what does ?mcsf_action do?
Not a lot to be honest.
In summary, it outputs a few lines of CSS code to style the sign-up form. The way it does it however is truly bizarre.
Rather than read in a static file, it outputs the CSS as a header-request, making the server spit out another server transaction every time the widget is called.
The comments in the file say “Outputs the front-end CSS. This checks several options, so it was best to put it in a Request-handled script, as opposed to a static file.”
We think it would be better if they dropped the custom CSS from the Widget options and bundled a static CSS file. The CSS can easily be overridden from the styles.css file of the users theme.
We commented out lines 108 and 109 form the mailchimp.php file in the plugin folder.
[code language=”php”]//wp_enqueue_style(‘mailchimpSF_main_css’, home_url(‘?mcsf_action=main_css&ver=’.MCSF_VER));
As you can see from the image below, once the lines have been commented out, the overall page speed is vastly decreased.
Let us know if this fix has improved your page loading speeds.