More share buttons
As long as there is search, there will be SEO.
Ye Olde Blog of SEO
Sep 01
wordpress code plugins

WordPress: Use Code Instead of Plugins, and 5 Examples

Plugins are complicated, expensive, and most of all taxing on your website speed. They add lots of unnecessary extra CSS and JavaScript to your website and can even cause issues if not updated.

There are quite a few plugins that I personally use out of sheer convenience, however I will always try to use a custom solution before I go adding a plugin.

Google Analytics Plugin

The Google Analytics plugin by Yoast is beautiful and adds a ton of extra functionality to your website but it is a huge hog when it comes to adding extra bulk to your website.

But how much bulk? Well let’s take a look:

3 megabytes

That’s 3 Megabytes total, or 3 Million Bytes! Granted, a lot of this code is used in the backend to display a custom Google Analytics dashboard, but in my opinion that is bloat that I just don’t want or need every time I hit refresh on my dashboard.

Conversely, to implement the code, you can simply add the following code to your functions.php file in WordPress:

 add_action('wp_footer', 'add_google_analytics');
 function add_google_analytics() { ?>
 // add your Google Analytics code here
 <?php ?>

In size, that’s about 103 bytes as opposed to the plugin that weighs in at 3 Million bytes! At this time I’d like to appropriately hashtag this as #WTF!!

Social Network Icons

There is a lot of room for debate on this subject, and quite a few different ways to skin the social network icon cat.

Since there are so many of these plugins, I’ll just look at the most popular one “Ultimate Social Network Icons.” This plugin weighs in at a whopping 9.6 Megabytes!

social network icons size

Is this even real life? There are literally 100’s of images within these directories let alone the code.

Zurb offers an exquisite alternative for social network icons in WordPress. They offer SVG images which make it so you can enlarge / shrink the images without losing quality. In total all of the images weigh in at 421kb and the code is negligible.


<a href="#" class="fc-webicon facebook small">Like us on Facebook</a>
 <a href="#" class="fc-webicon twitter">Follow us on Twitter</a>
 <a href="#" class="fc-webicon gplus">Follow us on Google+</a>

They also include PNG’s in case your browser or framework doesn’t support SVG’s. I’ve written a bit about WordPress not playing nicely with SVG’s in the past.

Duplicators, Cloners and Backup Programs

This is more of a pet peeve than anything. WordPress duplicators and backup programs really don’t add much weight to your front end, but they do put an unnecessary load on your backend and server.

Instead of installing a program to duplicate your WordPress install or back it up, why not just back it up from your cPanel or command line? It won’t keep entire copies of your website stored on your server, and you can keep a copy in the cloud as well as on your local system.

301 Redirect Plugins

If I make anyone angry with this statement, good:

If you don’t know how to do a 301 redirect on a server level, and need to use a plugin you should reevaluate your career in SEO.

Fear not, if you don’t know how to do this you can learn with just a few easy steps in Linux servers.

  1. FTP into your server
  2. Locate your .htaccess file in the root directory. If it is not there, create one.
  3. Enter the following code for every redirect. Save & Upload:
Redirect 301 /oldfile.html http://www.example.com/newfile.html

If you are scared of doing this just remember two things:

  1. make a copy of your .htacccess file before you do anything
  2. you can always revert and go back to the original if you broke something

Favicon Plugins

I’ve seen a lot of people use favicon.ico plugins to enable this functionality. Again, quite unnecessary. I won’t go into the exact size rundown, but I can’t imagine it could get any smaller than adding this to the <head> of your website:

<link rel="icon" href="https://patrickcoombe.com/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="https://patrickcoombe.com/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" />

Closing thoughts

If it sounds like I hate plugins, beleive me I don’t. Plugins are awesome and can save so much time. SEO Ultimate, for instance is an excellent way to insert title tags, meta descriptions, OGP, Twitter cards and so much more into posts and pages without issue.

There are some instances when a plugin is just not necessary. As time goes on, I am learning more and more when to use a plugin and when a snippet of code will do. When adding anything to a website, always consider the amount of space and resources it is going to add, no matter how minimal it seems. Thank you all for tuning in!



About The Author

Patrick is an SEO blogger and the founder of Elite Strategies, an SEO and internet marketing agency located in Delray Beach, FL.