WordPress Sidebar Stats Widget

I wrote a WordPress plugin that displays a small collection of site stats in a sidebar widget. Here is a screen shot of sample output:


Widget options screen shot

The widget includes a control panel to change the title and format the HTML that is inserted before and after each numerical stat.


Installation Instructions

  1. Download sidebar-stats-widget.zip
  2. Decompress the file contents
  3. Upload the sidebar-stats-widget folder to a WordPress plugins directory (/wp-content/plugins)
  4. Activate the plugin from the Administration Dashboard
  5. Open the Widgets page under the Appearance section
  6. Drag the Sidebar Stats Widget to the active sidebar
  7. Configure the widget options to suit your needs and click Save

WordPress.org plugin page

This plugin is in the official WordPress Plugin Directory here.

6 responses to “WordPress Sidebar Stats Widget”

  1. Plugin won’t accept a div tag in the “Before everything” box. It won’t insert itself into my standard sidebar div, either. So I voted it broken. Hope to see an improvement!

  2. Hi Corey

    My sidebar is a hacked and kludged mess, so complex it’s almost beautiful. Because of this, dragging widgets doesn’t work properly, so I normally call a plugin via coding – is the function to be called “sidebar_stats_widget”?

    Thanks in advance


  3. @sheta i just sent you an email. i think the problem is quotes, not the div tag itself. if you can help me locate the problem i can surely update the code.


    @wordsmoker yes, the function is called sidebar_stats_widget. bravo on destroying your wp to the point that widgets cower in fear. the function begins by pulling the saved settings from an option that you may also want to manipulate:


    $saved_options = array( );
    $saved_options = get_option("widget_sidebar_stats");
    if( !$saved_options ){
    // set defaults
    $default_options = array( );
    $default_options['title'] = 'Sidebar Stats Plugin';
    $default_options['beforeStat'] = '<b>';
    $default_options['afterStat'] = '</b>';
    $default_options['prefix'] = '';
    $default_options['suffix'] = '';
    update_option( "widget_sidebar_stats",$default_options );
    $saved_options = $default_options;

  4. nice plugin…its working fine for me…you can add some form of graph to show this statstics

  5. Lucien:

    WordPress.org puts that label on any plugin that hasn’t been updated in two years. I’m still using this widget, and no update is necessary.

Leave a Reply

Your email address will not be published.