Speed Up Load Times – Remove spaces – squash plugin bugs

by | Sep 4, 2013 | Broken Technology |

Bugs can kill productivity!  I just finished speeding up the load time on a site after 5 days of being relatively stuck.

First Byte Time F fail caused by bugs in Plugins

I was migrating a site from one server to the next different hosts as well.  The old server was suspect and dying.  So we were moving to WPEngine.  Normally, when I move things to WPEngine, it is lickity-split, fast!  But something was goofy this time.  The site was slow, both internally and externally.

Long story short -> bugs in 3 different plugins, similar bug.

Each had extra spaces after the closing php tag in one of the php files in the plugin itself.  Simply finding the extra space, and deleting it, sped up my site by a full second and that was first server response time, ergo that little bit of hesitation before files actually start moving.  Speeding that up pays big dividends.

Notes on Speeding Up Load Times by removing Bugs

Here’s some notes on what I encountered and the plugins that I encountered it with.  I did report the bug to each of the plugin authors.

Seems to be 3 plugins that create the extra blank lines. 2 of those had extra lines after the ?> tag was closed in their primary file. I removed those and they work fine. Initial response times improved. The third, I found an extra line in a sub file in the plugin. removed the extra line, but response time jumped up to 1.466 initially, then down to .106 on subsequent runs

1 deactivating Digg Digg reduced the blank lines from 3 to 2

reactivating generated this message in wordpress in yellow

“The plugin generated 2 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.”

 

possible SOLUTION – removed extra line returns after ?> in the file dd-class.php

2 deactivating Foliopress Descriptions reduced the blank lines from 3 to 2

reactivating generated this message in wordpress in yellow

“The plugin generated 2 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.”

SOLUTION – —- in plugin file fv-descriptions.php, delete blank lines after closing php tag (lines 1090 & 1091)
3 deactivating Search & Replace reduced the blank lines from 3 to 2

reactivating generated this message in wordpress in yellow

“The plugin generated 2 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.”

SOLUTION – —- in plugin file search-and-replace.php, delete blank lines after closing php tag (lines 1959 & 1960)
4 Deactivating all 3 plugins at the same time removed all blank lines

Also removed blank lines on external site.
When running http://www.webpagetest.org/result/130904_PN_WCF/

Initial run was an F for initial response at about 1.033

Subsequent 3 runs was an A at .102 and .129 and.106

Update – 2016

Not chasing bugs today, but did discover the the Plugin Organizer Plugin. This makes it easy to disable plugins that might run on pages, posts or custom post types when they are not needed. This increases the number of requests (calls made by a browser back to your hosting server) which slows things down. Fewer requests, less time spent.

One of my go to plugins, Gravity Forms runs by default EVERYWHERE on the site. I only need it to run on pages where I have forms embedded.

Solution to stop Gravity Forms from running where I do not want it

  • Installed the pluginhttps://wordpress.org/plugins/plugin-organizer/ (free) Set it up
  • Turned off Gravity Forms globally
  • Did a search on pages and posts for [gravityform
  • On the pages where I have form shortcode, I turned the plugin back on within that page!

End result, I reduced the number of requests by 3-4 (had some add ons too)!

 

Plugin Organizer Tutorial Videos (Speed and Plugin Conflict)

Comments

Responses...