For WordPress plugin developers: keep a register of when and where your plugins are activated.
If you are a WordPress plugin developer the chances are your plugins are available for download from the WordPress plugin repository. As part of that service the nice guys at WordPress show you how many downloads of your plugin you get per day. Very useful, and if you're like me you check your downloads numbers too often.
However what these stats don't show you is where your plugin is in use - which sites it is actually being activated on. Seeing that information would allow you to see exactly which sites are using your plugin, when they installed it, and what version the site is running. That is exactly what Plugin Register does.
By including the Plugin_Register class and calling it with some simple code in your plugin, your Plugin Register database will be updated with the name and version of your plugin, and the site name and URL. A simple call is made to your website to save these details in the Plugin Register table, and you get some great statistics on who is installing your plugins and where.
So, what do you need to put in your plugin? This example code hows you everything you need:
`// include the Plugin_Register class require_once( "plugin-register.class.php" );
// create a new instance of the Plugin_Register class $register = new Plugin_Register(); // leave this as it is $register->file = FILE; // leave this as it is $register->slug = "pluginregister"; // create a unique slug for your plugin (normally the plugin name in lowercase, with no spaces or special characters works fine) $register->name = "Plugin Register"; // the full name of your plugin (this will be displayed in your statistics) $register->version = "1.0"; // the version of your plugin (this will be displayed in your statistics) $register->developer = "Chris Taylor"; // your name $register->homepage = "http://www.stillbreathing.co.uk"; // your WordPress website where Plugin Register is installed (no trailing slash) $register->Plugin_Register(); // set Plugin Register to be called when the plugin is activated
The reports you get include:
Requires: 2.8 or higher
Compatible up to: 4.3.6
Last Updated: 11 months ago
Active Installs: 90+
Got something to say? Need help?