It’s been quite sometime since I released my WP-IRC WordPress Plugin. A couple of users complained about the increase in page load time and so I decided to fix it and ultimately ended up rewriting it.
By the way if you have not used it before, WP-IRC is a WordPress Plugin, that retrieves the number of users who are currently online in an irc channels and allows you to display this information in the sidebar using widgets.
Dynamic update using AJAX to decrease page load time
Since the Plugin has to connect to the irc server through sockets and do some protocol exchange to retrieve the user count in a channel, it was increasing the page load time drastically and was the major complaint that I was receiving about the Plugin.
I tired to decrease the page load time by lazily connecting to the irc server after the page is loaded using AJAX to retrieve the user count. This has drastically decreased the page load time and was one of the highlight of this rewrite.
You can check out this excellent article to find out how to use AJAX in WordPress.
Added caching to decrease page load time
In addition to using AJAX, I have also implemented caching so that the Plugin doesn’t have to connect to the irc server for every page load to retrieve the user count.
I implemented caching using transients in WordPress.
Support for multiple widgets
One of the other highlights of this release is that, I have enabled support for multiple instance of the widgets. This will allow users to use multiple widgets, each with its own configuration.
I implemented it using the Widgets API of WordPress.
Translation support
Finally I have also added support for internationalization in my Plugin. The .pot
file is under the /languages
folder and if you are willing to do translation for the Plugin, use the pot file to create the .po
files for your language and let me know.
Download and source code
You can download the Plugin from its homepage and the source code is available at github.
Try out the Plugin and do let me know if you have any feedback or comments.