3

I've now developed two WordPress plugins and would like to see some sites that use it. I'm looking for a way to find sites that use a WordPress plugin I built.

However, the official guidelines, don't allow me to log the hostnames of blogs that install my plugin, for example. Point 7:

No "phoning home" without user's informed consent.

So, are there ways to find sites using my plugins? The plugins I'm talking about are NaNo Stats and Snake.

I have thought about adding some HTML comments or a specific meta-tag to the HTML body of the site and then searching with Google. Would that work and be allowed by WordPress?

3
  • You could always ask. A "click to show support" shouldn't violate anything, and
    – s_ha_dum
    Commented Apr 2, 2013 at 17:09
  • 4
    Anything that doesn't ask seems a little shady to me
    – vancoder
    Commented Apr 2, 2013 at 17:19
  • 2
    I have seen some plugins using iframes inside the option pages to display various external info, but I would consider that "phone home" practise.
    – birgire
    Commented Apr 2, 2013 at 17:35

1 Answer 1

5

No, there is no safe way to know the sites using your plugin.

Let's take a look at the options:

Add a marker to the rendered HTML, a comment or a meta tag.

This would still require a search engine to index these markers and tell you when they are found. But what's more important: your users would serve these extra bytes on each request to each user. What a waste of resources!

Phone home via email

I have seen plugins sending an email in an activation hook with the site address (and the admin email address). This is obviously unethical. Never collect any data without consent.
It is illegal too in countries with strong privacy laws like Germany. You could get sued in those countries, and due to formal cooperation between authorities a sentencing in Germany would reach you in other countries of the EU too.

Embed a tracker in your options page

De facto the same as above. Plus, you'd have to fiddle with SSL setups to avoid security warnings on the user interface.
In some setups (intranets for example) it isn't even possible to load external content; your plugin would fill the error log with very unpleasant messages.

So what could you do?

Read your HTTP referers. In the user's plugin list is a link to your site; you can even add additional links. Use an interesting link text to make people click on it.

enter image description here

Sample:

<?php  # -*- coding: utf-8 -*-
/**
 * Plugin Name: Add extra link to plugin list
 * Description: Demo plugin showing how to filter the plugin links
 * Plugin URI:  http://wordpress.stackexchange.com/questions/94308/finding-wordpress-sites-using-my-plugins
 * Version:     2013.04.03
 * Author:      Fuxia Scholz
 * Author URI:  https://fuxia.me
 * Licence:     MIT
 * License URI: http://opensource.org/licenses/MIT
 */

add_filter( 'plugin_row_meta', 'wpse_94308_extra_link', 10, 2 );

function wpse_94308_extra_link( $links, $file )
{
    static $plugin_base = NULL;

    if ( NULL === $plugin_base )
        $plugin_base = plugin_basename( __FILE__ );

    if ( $plugin_base !== $file )
        return $links;

    // Run this only once
    remove_filter( current_filter(), __FUNCTION__ );

    $new_link = "<a href='http://wordpress.stackexchange.com/q/94308/'>See how I did this!</a>";

    return array_merge( $links, array ( $new_link ) );
}

I have seen plugins adding a parameter to such a link like '?ref=' . home_url(). This borders the privacy issues mentioned above.

Use an analytics software like Piwik to track incoming traffic. Your visitors privacy is more important than your curiosity. :)

2
  • Another bad option I have seen is to set a custom HTTP header response, for example W3TC sets X-Powered-By:W3 Total Cache/0.9.2.8 and you can theoretically scrape headers faster than parsing meta tags, again a really bad idea.
    – Wyck
    Commented Apr 3, 2013 at 1:24
  • 1
    Thank you for this info, great answer! If you happen to have a a website with a good page rank users might be interested in submitting their site to a 'sites using XX plugin' gallery on your page, or at least a form in the admin area requesting/appreciating feedback and sharing how users are using this plugin.
    – mahalie
    Commented Apr 25, 2013 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.