Multivariate Virtual Machine for WordPress Plugin Debugging
If you are a WordPress plugin developer I guess you know the following case just too well: You have just released your plugin or a new version of your plugin, when a user tells you it’s not working (for them). One of the go-to solutions for a lot of devs is the "have you tried disabling all other plugins" to see if the problem is actually caused by your plugin. I know that there are cases where this might be necessary, but I see it more as a last resort solution. Who can really afford it to deactivate all plugins in a live site, just to help one developer to debug their plugin. As a user I’d rather pass on the plugin that is apparently causing the problem (irrelevant if it actually is the culprit).
Recently a problem in my plugin ResizeFly has been brought to my attention, and I was not able to reproduce it. When I asked the user (thanks Jeroen) for his configuration, this is what he answered:
WP 4.4.3, running Apache/2.4.16 (Unix)
and
Clean WP 4.5.2 install using the TwentySixteen theme, and ResizeFly 1.1.5.
I can confirm the plugin is working and actually showing new thumbs in the Image Library.I also tested Resizefly on another existing project using WP 4.2.8, and on that project new thumbs in the Image Library are NOT showing (same problem, 404)
The challenge I was facing was how am I going to debug that. Of course I could build a Vagrant virtual machine mimicking the users’ configuration, but this isn’t something I can do for every bug report I get. Enter the "multivariate virtual machine for debugging WordPress plugins " (and of course themes as well): Of course I can’t exactly replicate the exact user config but it allows me to quickly change the PHP version via phpbrew, change WordPress core, plugin and theme versions with Composer and switch the web server between Nginx and Apache, to quickly see if a plugin has a problem with a specific environment.
So fire up WordPress 3.5 and PHP 5.2.17, activate your plugin and see what happens. For comments and questions: I am @alpipego on almost all known platforms.