Plugins that add social sharing buttons should be fairly light and fast — they generally don’t need to fetch much information about a page, like an SEO or SMO / SSO plugin does. Here are some example “execution time” metrics from the P3 (Plugin Performance Profiler) plugin, using WP Test Data, and several popular social sharing plugins (along with the WordPress Core and Twenty Fourteen theme for reference). The plugins were configured to include the Facebook, Google+, Twitter, and Pinterest sharing buttons at the bottom of single posts and pages.
There is a huge variety of available plugins for WordPress — 30,326 plugins as of today — and if you’ve tried more than a few, you’ll have noticed a marked difference in their quality as well (functionality, user interface, stability, etc.). If you know your way around PHP, you should take a moment to browse the source code of a plugin before installing it. You’ll notice quite a difference there as well. ;-) You can view WPSSO’s source code directly from WordPress.org’s SVN repository. If you do, please excuse the lack of comments — it’s on my To-Do list. ;-)
I’ve always kept an eye on performance, and used WordPress’s object and transient caches when possible, along with disk based caching when appropriate. NGFB and WPSSO are fast, but until recently, I’d never compared their performance to other plugins. As I prepare WPSSO v2.4.4 for release later this week, I took some time to double-check its performance and that of a few other plugins as well.
Over the past few weeks I’ve been looking at different solutions to improve the speed of my WordPress websites. The first step was to mirror and redirect the static content to another server (aka Content Delivery Network or CDN). I’m currently using a DreamHost VM, but I may look into using Amazon S3 as well. This is an easy way to save bandwidth, and off-load a web server that is configured for dynamic content (larger and slower). In the case of PHP and WordPress, there are several additional options available to improve local web server performance. I’ll describe the ones I’m currently using, including their expected impact to performance and short-comings. This article deals mainly with the local Apache Httpd and PHP configuration. There are additional infrastructure solutions that can improve performance, like using Nginx servers on the front, Varnish cache servers in the middle, and Apache Httpd on the back-end (for PHP and WordPress). This post is only about optimizing the Apache Httpd back-end. If you’re considering adding a Varnish server in front of Apache Httpd, you should probably avoid caching whole pages in Apache Httpd and leave that to the Varnish servers.