Plugins vs Custom Code

Plugins vs Custom Code

When Not to Use a Free Plugin?

When choosing to use a plugin or writing custom code, there is only one variable to use – Opportunity Cost. This the loss of potential gain from other alternatives when one alternative is chosen.  So why not just pick a free plugin, because, in reality, they are not free! The cost can be measured in the speed of the website.

In the article “Why Performance Matters” in Google Developers’ WebFundaments, the break down the cost of slow sites. Google even offers a cost calculator as a part of its new mobile testing: Think with Google. There is a cost calculator, where you can see how much it really costs.

Now, for our example, we are going to take a Social Sharing & Following plugin which is free. When we added this plugin, due to JavaScript and the options it offers. It has an impressive selection of icons and offers buttons, popups, and even animation.

This plugin added half a second to the load time of the site.  That is a lot when you consider the site was at 1.5 seconds load time, to begin with. It increases the load time by 33%. How much does this cost the website? Let’s use some numbers. We already know what the speed of the site will be with without the plugin nor custom code, but this functionality is required, as per the marketing department.

The site is a B2B consulting site with an average of 450 monthly visitors, of those visitors 3.8% convert into an average billing of $500. Using the Think with Google Calculator you find that the cost is $2,416.00 per year.  That may not sound like a lot, but what if the company’s average billing is $1,200.00 or they have a larger market share with 2,500 average monthly visitors.

The second option is to have custom code written instead of using the free plugin.  This option allows you to show the icon where you want and you can upload any icon you want to use.  The key here is it is not using any additional JavaScript.  It is built using the existing JavaScript, and it causes the web page to have an additional 0.2 seconds on the pages loading the social sharing icons. Using the same numbers, the cost per month for this option is $552 per year.

With the average time between major website redesigns being 2.66 years the cost of the “Free” plugin is $6,426.56. The cost of the custom code is the cost for the coding which you are told will be $100 added to the revenue loss of $1468.32 equals $1,568.32. That means the Opportunity Cost of the “Free Plugin” is  $4,858.24. The obvious choice is the custom code.

Why Reinvent The Wheel?

We have all heard this before: “Why reinvent the wheel?” It holds true here also when the wheel costs quite a bit to reinvent. Let’s use the same numbers as the Social Sharing plugin, but now we are building an SEO component for the website. To develop such a plugin, you are quoted 40 hours, a total cost of $4,000.00.  That means that the custom code that provides all the functionality that existing SEO plugins do, has to be .4 seconds faster than the free plugin.  Hate to say it, probably not going to happen!

The choice here would be between which plugin to use. You can use the same criteria for the cost in load times, but also add all the other costs such as premium options, ease of use (staff training time), and support (usually a premium option).

General Rules

Don’t use a plugin where it takes as much time to install it as to write the “no-plugin” option.  I have seen WordPress websites have only 4 or 5 plugins.  I have seen others have upwards of 40 to 50 plugins!  Does the site really need all those plugins?

When you are “Googling” for a WordPress plugin feature look at the option.  You need a function that will strip the “?ver=5.2” after the static files so that they can be cached longer in the visitor browser.  The sear results will also return an article telling you which plugin is recommended but also tell you how to add 5 lines of code to the functions.php to achieve the same release. Go with the code.

As for plugins to have amazing special effects to really spice up your home page and awe the visitor, are they really needed?  I can understand a carousel or a hero image on the home page, but is it really needed?  If you can not give 3 good reasons to put it on the home page other than “it’s cool”, “amazing”, “this company uses it”, or “it is free”; DON’T USE IT!