Secrets: Debugging and testing plugins

December 14, 2008 by Jukka Svahn

Shortly said no, I don’t test plugins on every system compination, that would be nuts job and take just too much time. Basically testing is just done on two different setups aka servers. But that doesn’t yet tell me where the plugin actually works and where not.

First I test the plugin on couple different server setups, using latest stable version of Textpattern. Usually those servers are fairly different, ‘cause one is XAMPP on Windows and those others are kinda real Linux installs. Those all use latest stable MySQL 5.x- and PHP 5.x-installs, plus PHP 5.2.5.

Now I basically know where it works, and that testing took about couple minutes, if everything worked fine. But I yet don’t know what it requires from setup, and I must know that to be able to write ‘official’ requirements.

That is done by looking changelogs: PHP’s and Textpattern’s. Comparing changes from used functions, methods and libraries, and determinating where it works, and more importantly stays stable and secure. That is basically why rah-plugins might work on older setups, but you might consider stableness and security. Does it fail sometimes?

But wouldn’t it be easy to fix plugins to work really old setups?

Kinda, but on other hand not. Supporting older setups usually makes the code longer, slower to run and more ugly (clean code is important). Also note that you shouldn’t be using a really old setup: it is a big security risk.

If plugins were supporting really old installs, it would make future changes and supporting newer setup versions harder and drastically make work hours longer, when even currently writing a one single plugin might take about 50 hours of non-stop work and future updates even more.

What does jQuery -requirement mean?

Ah, some people don’t yet know that Textpattern includes jQuery Javascript library. That requirement basically means that plugin requires that library to be installed to work properly. That why it is mentiond seperately is just because older Textpattern installs don’t include or newer jQuery version. If you have a older Textpattern install, you have to either update to version where there is jQuery in place or install jQuery by yourself seperately. Note that rah frontend plugins never use jQuery, only backend plugins do. The requirment is also mentioned to make it clear that a JavaScript enabled modern web browser is required.