How Fast is WPSSO Compared to Other Plugins?

wpsso-logo

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 started developing the NextGEN Facebook (NGFB) plugin about a year ago, when I broke my foot and was stuck in bed / on the couch for much of the day. NGFB is the foundation for WPSSO, minus the sharing buttons and their related features (shortcodes, widgets, stylesheets, javascript caching, and url shortening). WPSSO has 25% less code, is 0.0070 secs faster per page load, and is often preferred for websites that already have (or don’t need) a set of sharing buttons.

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.

Continue reading


Check the SOA Serial Number on NS Servers

perl-camel

If you manage a DNS master, and push zones to several slaves / secondaries, you may have found that over time — as configuration files and firewall rules change — one or more slaves may have lost its ability to update its zone files. Perhaps the slave is no longer being notified, or it may have lost the necessary zone transfer permissions from the master. In a large distributed environment where DNS changes are frequent, checking the SOA serial number for all the NS servers in a zone can be quite helpful — a quick way to eliminate the DNS as a possible source of a problem. Here is a perl script I wrote a few years back to retrieve the SOA serial number for a given domain.

Continue reading


NextGEN Gallery v2 Resize Issue Persists

If you are concerned about the quality of your NextGEN Gallery v2.x resized images, this should be of particular interest to you.

Some months ago I contacted Photocrati to ask them how, in version 2.x, developers could retrieve the “actual” dimensions of a resized image. In the past, after resizing an image we could use PHP’s getimagesize() function on the resulting file, but in v2.x image resizing is dynamic and those resized images may not be available on disk. I had some concerns between the expected / calculated image dimensions, those returned by NGG v2.x’s methods / functions, and the actual image retrieved by the URL. All 3 dimensions were different! A resized uncropped image which should have been 300x200px, was reported as being 300x199px by the NGG methods / functions, and the image retrieved by URL was 298x199px!

This may not sound like much, but a few pixels here and there can lead to image distortion when rendered by browsers, alignment issues in page layouts, and failures when working with minimum image dimensions (for example, Facebook ignores images smaller than 200x200px).

Continue reading


Add a Custom Field Video URL to NGFB

If a theme provides a custom field for an embedded video URL, you can tell NGFB to use that URL in its Custom Settings automatically. The following is added to a (child) theme’s functions.php file.

The code above hooks into the ‘ngfb_get_meta_options’ filter and receives two arguments – the meta options and a post ID. The ‘_format_video_embed’ custom field is retrieved and saved back into the NGFB post meta options array. The input field is also disabled so there will not be any confusion about where to enter a video URL on the Post / Page edit page.

Continue reading


WordPress Multisite Activate, Deactivate, and Uninstall

php-logo

I recently added multisite support for NGFB and faced a few challenges — the documentation is a little slim, especially when it comes to uninstalling / deleting plugins. The basic premise is that network-wide plugin activation must take care of the essentials for all sites (like creating default settings in the options table), and when removing the plugin, it should cleanup all its settings from all the sites. I prefer working within classes, so opted to keep the uninstall method in the class, instead of breaking it out into an uninstall.php file.

Continue reading