To Plugin or Not to Plugin?

in Blog

plug or not lgPlugins and I have a love-hate relationship. I don’t entirely understand how they work, and I’m not confident in my abilities to deal with the fancy coding potential some of them contain. Whenever I install a plugin I get a little freaked out. There’s always a small sense of dread when I upload and activate one, like I know I did something wrong or missed a key step in set up, and I’m just waiting for everything to crash. If it’s all the same, I’d rather find a theme that has the same functionality and just not have to deal with the plugin at all.

It was in that mindset that I came across a post on WP Tuts by Pippin Williamson about plugin impact on site functionality. When I first saw the topic, I thought it might make a case for avoiding plugins altogether- which would have been right up my alley. As the creator of Pippin’s Plugins, he’s obviously biased toward the plugin so I remained skeptical.

In his article “Functionality: Plugins vs. Themes” he points to a recent trend in tutorials that focus on doing something to your site “without a plugin” and a misconception that functionality driven by a theme is superior to functionality driven by a plugin. His view is that there is nothing detrimental about using plugins themselves (he actually considers them the preferred option for enhancing site functionality), nor is there anything wrong with using a large number of plugins on your site.

He points out that code in plugins runs exactly the same as code in themes. The main difference between code in a theme and code in a plugin is the time of execution. Active plugins are loaded and executed before the currently active theme. As far as actual performance goes he says, “If you place a function into a plugin, execute it, record the timing, and then do the same thing with the function but while it is placed in the theme, you will find that there is zero difference.”

The difference in the purpose of the code in themes vs. plugins is that themes are supposed to control the visual aspects of your site; plugins, the functionality. Some themes have additional functionality to make it more of a one-stop shop kind of experience, but neither is better than the other in terms of site performance. What it comes down to is that plugins, themes or whole websites for that matter, are only bad if built poorly.

What DOES impact site performance then? Plugins or themes that are poorly written, that tax the site while loading resources and performing database queries. Williamson says, “Plugins that do not perform queries on the database or load resources have zero (or very near zero) impact on performance, and that is why you can literally run 300 plugins on your site with no impact.”

Ok, so plugins aren’t inherently evil, but if I can still get the same type of functionality I want without one in some cases, why should I go to the trouble of using a plugin at all? This is where he pulls out his big guns with the following huge advantages:

  • Plugins allow you to separate code into chunks which makes a project much easier to maintain and debug. If something breaks, you simply deactivate the plugin.
  • Changing themes typically means you will lose any custom functionality you have (including short codes) because the new theme will either not have the same functions, or it will use or execute them differently. If all that coding is in plugins, all you have to do is upload the new theme and activate it: everything will still work just as before.
  • Plugins can each be separately updated and enhanced. If you add improvements to a theme, then the entire theme has to be updated.

In the end, having a site that works efficiently and can be easily updated trumps my discomfort with plugins. I don’t want to have to rebuild my site from scratch just because I changed the look and feel of it. And let’s face it, there are plenty of plugins that are simply plug-and-play and don’t really require any custom coding. So I think my advice to myself is: get over it. Plugin, turn on and blog out.

What are your thoughts? Do you agree with Williamson’s ideas? Give us your comments in the box below.

Comments (4)

  • Comment by imsel

    To put it simply, a WordPress plugin is a program that extends the core functionality of the Content Management System (CMS). The development of plugins began because programmers wanted to increase WordPress’s functionality without altering its core structure.

  • Comment by Marco

    You are right on target here! I hold to the same idea that SEO 2.0 works without a lot of plugins. Because it is the PEOPLE
    Reduce clutter and keep it simple below the hood too.

  • Comment by QUIWIQ Marketing
    QUIWIQ Marketing

    I also agree with the author of this article. The truth is that many times Plugins are plenty of holes and the code is not always properly written.
    Having used WP since 2.0V. I have had many problems with plugins, most of them when I was a beginner but what I have learned is that fewer plugins usually means better performance so my philosophy is to use only those plugins that are essential and reliable.

  • Comment by Jason

    I agree 100% with Pippin here. I think Themes should handle the look of the site and Plugins should handle the functionality.

    Themeforest seems to be adapting to this principle as well with their most recent update to WordPress theme guidelines. Authors are required to keep special functionality out of themes and place them into plugins.

    I think it’s a good step forward for the WordPress community to adapt this principle as a standard practice.