Plugin WP-Slimbox2 performance issue

Hi,

one my other website energies2demain.com I use a bunch of plugins to improve the behavior of WordPress.

One of them is WP-Slimbox2 which allow to display a nice lightbox when the visitor click on a picture.

This plugin is great but it decrease the performance of the website, but we can correct that.

First, what cause the problems : too many files need to be load :

  • One css file : plugins/wp-slimbox2/slimbox2.css
  • one Javascript file : plugins/wp-slimbox2/javascript/slimbox2.js
  • an other Javacript file : plugins/wp-slimbox2/javascript/slimbox2_autoload.js
  • 3 images to make the button to close, next and previous

To simply decrease the number of file to download, I simply put them in the template of my theme : I took the output of the javacript from firebug and put them in the bottom of footer.php . Same thing with the css in the main css file from the theme. For the picture, well, I didn’t figure yet :p .

One big big problem with this solution : after the update of the plugin, every thing is lost. Moreover, the “mess” you put in all the files are still here.

So I’m going to write a very light plugin to do a lightbox in jQuery. This plugin will have no option, no configuration and no image to control, no installation. Basically, is going to be only a Javascript snippet that you will have to insert in the footer of your theme.

This entry was posted in Wordpress performance, wordpress and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">