We all love plugins. Depending on your application, there may be thousands of plugins available to take care of just about any need you can think of. WordPress has one of the largest collections of community created plugins that I've ever seen, with over 17,000 at time of writing!

Although the word plugin has a nice ring, remember that plugins, generally speaking, are a one-size-fits all solution to a common problem or need. Which means, they can carry some baggage with respect to site performance, code cleanliness or maintenance.

Let's look at a real life example. I recently overhauled a WordPress site, which originally had over 20 plugins installed. It wasn't the number of plugins that was alarming, but their purpose. One plugin in particular was used to create a carousel effect on a dozen or so images on an inside page of the site.

Essentially, this plugin creates a chunk of HTML code, loads a JavaScript library, and throws in some CSS. Okay, not so bad. Probably something you could have done without a plugin, but it was painless.

But, looking at the site source code, the plugin created almost 150 lines of JavaScript and CSS sitting inside the <head> tag of EVERY page! The plugin was only used on one inside page. Now, imagine 20 plugins with similar, but varying degrees of clutter inside the head tag.

Plugins are great, and can fulfill a need, but don't use them in place of a few minutes of "manual" coding. Not only will you keep your source HTML clean, but you'll have more control down the road.

Tags:

Leave a Reply

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