Oct 28 / Kevin

Using APIs to Serve Stats and Other Information

Technorati API WordPressJoost de Valk, a popular WordPress coder and marketer has released (and will possibly continue releasing) methods for placing various information snippets on your blog without plugins.  Generally, plugins like the ones that serve a single purpose, as in feed stats, don’t weigh in at more than 50KB apiece when installed.  However, when you need multiple plugins and dozens of additional requests with each page load, the time adds up, creating a slower loading website.

The one main drawback of using organic code vs. plugins is the fact that you need a little background on where to place the code and whether or not you will be able to integrate the code into your site.  For one, it requires PHP 5.2 or higher and the ability to edit your main PHP code files (with WordPress you’ll be inserting the code within The Loop — within your sidebars or any other appropriate area.

WordPress Services API Codes

Sample Code

Another key benefit is the fact that the code is fully optimized and includes cacheing to eliminate the overuse of your API, which the plugins may otherwise not take into consideration.

You can find each method and code on the following pages:

Again, these pieces of code are not for your “common” user, in which case it would be easier and less time consuming to use plugins.  Otherwise, they are great for speeding up and customizing your site using the APIs.

Leave a Comment

Professional WordPress Themes