The Xavisys WordPress Plugin Framework

A few months ago I was chatting with Joost de Valk and he was talking about a new plugin toolkit that he was making. The basic idea was to make a flexible base that he could use to build on for all his plugins. It would handle all the tasks that are common to all his plugins (options page, dashboard widget, etc) and still be easily extended so each plugin could handle more specific tasks as well. Now his plugins (at least some of them) use his toolkit.

It was a great idea, and I finally got around to writing one for my own plugins. I built it as an abstract class (and a tiny CSS file) that I extend for each plugin. Here you’ll get to see a quick tour of what the framework does. Let me know in the comments if you’re interested in seeing a walkthrough of how it was built, and feel free to download Efficient Related Posts to see it in action.

Read more

Efficient Related Posts 0.3.4 Released

We just released version 0.3.4 of the Efficient Related Posts plugin for WordPress. It uses the new Xavisys Plugin Framwork (I’ll post more info on that soon), which gives it a nice new options page, links to the support forums, etc. We also did a lot of the work toward internationalizing it, and hopefully it will be fully translatable int he next version (coming soon).

If you want to request a feature, or need support, go to the Efficient Related Posts Support Forum. More information is available on the Efficient Related Posts page.

Join the forum discussion on this post

Twitter Widget Pro 2.1.3 Released

The new Twitter Widget Pro support forum has turned up some great ideas and has helped catch some easily missed bugs. This latest release of Twitter Widget Pro includes a bugfix that removes a duplicate closing tag for the title link, which was caught by someone in the forums, as well as an enhancement that makes the date format a per-widget setting (also suggested int he forums).

If you want to request a feature, or need support, go to the Twitter Widget Pro Forum. For more information, go to the Twitter Widget Pro page.

Twitter Widget Pro 2.1.2 Released

There was a small formatting issue introduced in Twitter Widget Pro 2.1.0 where there were no spaces between the tweet and meta data or between the date of the tweet and where the tweet was from (such as “from TweetDeck”). When I added the shortcode functionality I had to remove a lot of the excess whitespace so that the formatting built in to WordPress didn’t mess up the formatting of the widget when it was embedded in a post or page. I just released version 2.1.2 that fixed the spacing without messing up the formatting for the shortcodes.

I also added in some links to the WordPress Twitter Widget Pro Support Forum to make it easier for you to ask questions or make suggestions or requests. For more information, go to the Twitter Widget Pro page.

Join the forum discussion on this post

Twitter Widget Pro 2.1.1 Released

Recently, a Twitter Widget Pro user (alx) asked on the support forum for a new feature. He wanted to be able to have all the links open in a new window, and that’s a great idea! I just released version 2.1.1 of Twitter Widget Pro with this exact feature. If you want to request a feature, or need support, go to the Twitter Widget Pro Forum. For more information, go to the Twitter Widget Pro page.

10 Great WordPress Plugins

One of the greatest things about WordPress is how extensible it is through it’s plugin system. There’s a plugin for almost everything. There are more than 4,400 plugins just in the WordPress.org Plugin Directory and there are plenty more that aren’t in the directory. Unfortunately, sometimes there are so many plugins that it makes it hard to find the best WordPress plugins in the massive sea of options. Here are some of my favorite overall plugins.

  1. Akismet
  2. Simple Trackback Validation
  3. Headspace2
  4. Clean Slugs
  5. Google XML Sitemaps
  6. Twitter Widget Pro
  7. WP Super Cache
  8. Sociable
  9. Subscribe to Comments
  10. Twitter Tools

Read more

Twitter Widget Pro 2.1.0 Released

I just tagged a new version of Twitter Widget Pro which includes an oft-requested feature, a twitter-widget shortcode. You can now embed a twitter widget into any post or page by simply dropping in a shortcode like [twitter-widget username="xavisys"] to embed a widget like this:

To read more about how to use the shortcodes and to download the plugin, go to the Twitter Widget Pro page. For support, go to the Twitter Widget Pro Forum

GPL Themes Get Some Love, Plugins Suffer?

Matt Mullenweg asked the Software Freedom Law Center whether WordPress Themes are GPL too. One sentence summary: PHP in WordPress themes must be GPL, artwork and CSS may be but are not required.

As a huge proponent of the GPL, this is exciting. However, as Joost pointed out in On the GPL, Themes, Plugins & Free, there’s some disappointment as well. The exciting part is that a question that’s long been asked has been answered by a “pro” (albeit a biased “pro”), and the answer is just what many of us wanted to see. Now we can get some people to focus on commercially supported GPL themes rather than just themes with more restrictive licenses. They have even added a Commercially Supported GPL Themes page to wordpress.org! That’s awesome, and a great followup to Matt’s “State of the Word” talk at WordCamp San Francisco.

So what’s the problem? Well, Matt has said that the plugin developers have been the rock stars in the WordPress community, and it’s time for the theme designers to shine. I have no problem with the theme designers getting to shine, but as a plugin developer I wonder “Where is the Commercially Supported GPL Plugins page? I love to give to the community with GPL WordPress plugins, and will continue to do so, but I’ll also be offering premium support for many of these in the future. I’d like to see the same treatment for theme designers and plugin developers.

Having said all that, I’m really glad to see the GPL themes page and I think it’s a good step in the right direction.

The Problem with Related Post Plugins

Showing related content to your users is important. I don’t think there’s anyone disputing that (at least not that I’m listening to). The real question is “how?” How can you show your user good related content without adding a ton of extra work for yourself? This is where related posts plugins come into play.

There are a lot of options out there. So many that it’s quite time consuming to try them all until you find one that suits you. Two of my favorites are WordPress Related Posts and Yet Another Related Posts Plugin (YARPP). Yarpp gives you more control over how matches are made, but for that very reason it’s also less efficient. Joost de Valk referred to it as a “heavy plugin” in his article on Optimizing WordPress database performance, and it definitely is. WordPress Related Posts is far more efficient, but offers you a little less control over how matches are made. Unfortunately they share the same problem.

So what is this problem? They all find matches to a post in the front end rather than the back end. They do it when a user views a specific post, rather than when a post is created or modified. On a brand new site I launched, which has only 7 posts, we’ve received roughly 2000 pageviews. That’s pretty low, but lets take a look at it. About 700 of those visits were to the home page and about 1300 were to single post pages. If you only show related posts on single post pages (which is how we currently do it) then the related posts plugin has been run over 1300 times for only 7 posts, which is roughly 185 times per post! If I were to show related posts for each post on the front page then it would have run another 4000 times (which is a conservative estimate), bringing it to 757 times per post. If you think this seems excessive, lets take a look at the stats for Web Developer News. It has had over 13,500 page views in the last 30 days. About 750 were to the home page, about 140 were to other static pages, roughly 550 were to tag pages, and another 250 were to miscellaneous pages such as search pages. That leaves 11,810 visits to single post pages and 21 posts during that same time. That’s about 562 times per post! If I added related posts to the home page, tag pages, and search pages it would need to be run roughly another 15,000 or 1,276 times per post.

Read more