NextGEN Facebook Open Graph v4.3 Plugin for WordPress

Aside by Jean-Sebastien Morisset - Tuesday, April 16th, 2013 - (0)

Here’s a summary of new features in version 4.0 to 4.3 of NextGEN Facebook Open Graph (NGFB), the best and most complete Open Graph plugin for WordPress.

Version 4.0 introduced many internal code changes in order to use the WordPress Object Cache and Transients API functions to improve performance. The performance gains will be most noticeable for logged-in users and websites that aren’t using full-webpage caching plugins.

You can download NGFB from the wordpress.org website, or install / upgrade it from the Plugins admin page of an existing WordPress website.

Continue reading…

Read Adobe XMP / XML in PHP

Categories: PHP, WordPress
Comments: No Comments
Published on: Tuesday, April 9th, 2013

I’ve found a few snippets of PHP code to read XMP / XML meta data from an image file, but none that I would call very robust or efficient. I ended up writing my own for Underwater Focus, and I’m quite pleased with the result. In fact, after adding support for a shortcode, I packaged it as an Adobe XMP plugin for WordPress.

The first part of using XMP meta data is reading the XMP information from the image. I’ve seen a few solutions that read the whole file into memory, and others that read-in just a small part. If the XMP / XML contains a lot of information, that small part may be incomplete. And each time the XMP meta data is required, the original (and sometimes quite large) image file must be re-read. Since the XMP doesn’t change unless the original image is updated, there’s no reason to keep re-reading the same large file time and time again.

Continue reading…

PHP Class to Cache Remote Content by URL

Categories: PHP, WordPress
Comments: No Comments
Published on: Thursday, February 14th, 2013

While developing the NextGEN Facebook OG plugin for WordPress, which adds social buttons from Facebook, Google+, LinkedIn, etc. to content and pages (along with several other features), I found the response time from these websites to be disappointing at times. When speed testing the pages of my websites, the JavaScript and images from these social elements would sometimes be a significant part of the total page load time. You can’t really save a copy of these files and serve them yourself, because they are frequently updated. You could create a cronjob to update them on a regular basis, but the maintenance of this can be cumbersome (as you add or remove files, etc.). It’s much easier to use a PHP method that caches and refreshes the remote files, and translate the URL at the same time. For example, something like:

Continue reading…

Encode Small Images in Stylesheets

Continuing the earlier theme of Optimizing Images to Save Bandwidth and Speed Page Load, you can also encode small (background) images directly in your stylesheets. For each image / page element encoded within a stylesheet, it means one less HTTP connection for content, which in turn means pages finish loading faster. These images should generally be small and downloadable quickly — what you want to save is the HTTP connection overhead, not the download time (both images and stylesheets are generally cached after downloading). The images should also be encoded within sourced stylesheet files, so the stylesheet files can be cached by the browser. If you encode images within your content (using <style></style> tags for example), the encoded image will have to be downloaded for every page view, so although you’re saving HTTP connections, your page size has increased. By encoding images in sourced stylesheet files instead, the browser (and content delivery services) can cache the whole stylesheet, including the encoded image(s).

Continue reading…

Optimize Images to Save Bandwidth and Speed Page Load

Comments: No Comments
Published on: Sunday, February 3rd, 2013

A few weeks ago I mentioned the wesley.pl script from GitHub to optimize images, and how I had modified it to keep (or discard) the EXIF / XMP information. Making sure images are as small as possible is important to save bandwidth and improve page load times (and google rank), so I think it’s worth discussing my image optimization process in more detail.

Continue reading…

page 1 of 7»
Freelance UNIX SysAdmin
20121006-095055-jwolfe-49

Looking for a Sr UNIX Systems Administrator specializing in Systems Integration? I may be available for freelance or contract work, either remotely or on-site. You can contact me by email at jsm@surniaulula.com to discuss solutions specific to your needs.

  • Location : Montreal QC, Canada
  • Availability : 4-8 hrs / week freelance

Continue reading…

Social Pages and Feeds
FacebookGooglePlusLinkedInRSS