3

We have reports that our plugin did result in a blank page after installation, and we've got also bad and unfair ratings just for that. Those users don't seem to be able to read install instructions or requirements and prefer blame us maximum as possible for that. I am somehow quite pissed that this can happen at all on this platform. However, this is what we did:

Follow best practices for wp plugins:

  • prefix everything
  • make PHP & WP version checks
  • test that required PHP extensions are there
  • put critical parts in try/catch clauses
  • test against at least 10 popular plugins and another 10 crap plugins
  • provide a visual requirements checker
  • updated: use a virtual PHP renderer as through ob_start

This alone doesn't seem to be enough since there could be still a name collision or other trouble with plugins which load client side resources regardless they are needed (AMD/Require-JS).

I am aware that safe developing for any hosting/wp-setup is impossible due to the nature of PHP and the hoster's own practices in regard of HTTP/PHP setups but I wanted to make sure that I didn't miss anything. For instance, are there more APIs provided by the WP platform to make sure that a plugin can't cause a blank page? I know that fatal PHP errors are difficult to catch or even to avoid, except you bloat your code with endless measures.

Thank you!

closed as primarily opinion-based by Dave Romsey, cjbj, kaiser Oct 10 '16 at 23:04

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    You can never write a save plugin nor can you write a plugin that will work on all systems. I'm busy with a huge pagination plugin using OOP which I hope to release in the future. It will require php 5.4 + and wordpress 4.0. This is what I'm sticking with. It is unfortunate for anyone not meeting these requirements, and also not reading the documentation. You cannot please all. Apart from what you have done, the only thing left is for the user to first read the documentation, understand it and make sure his/her setup meets minimum requirements – Pieter Goosen Mar 19 '15 at 12:42
  • yeah, thats what I was afraid of too. thanks for the heads up! – stackoverclan Mar 19 '15 at 12:47
  • 3
  • thank you, looks we did all that. we even actually avoid any use of wp's api. – stackoverclan Mar 19 '15 at 20:48
  • Hi Tara, just checked 'admin-page-framework', not sure how it helps me to write non-page-breaking plugins but thanks. We're using Redux-Framework and its already big. Making the user install other plugins before ours seems also a little error prone... – stackoverclan Mar 19 '15 at 23:39

Browse other questions tagged or ask your own question.