NewStatPress | Stefano Tognon and cHab (from Daniele Lippi works)


NewStatPress is a new version of StatPress that was the first real-time plugin dedicated to the management of statistics about blog visits.

It collects information about visitors, spiders, search keywords, feeds, browsers etc.

Once the plugin NewStatPress has been activated it immediately starts to collect statistics information.
Using NewStatPress you could spy your visitors while they are surfing your blog or check which are the preferred pages, posts and categories.
In the Dashboard menu you will find the NewStatPress page where you could look up the statistics (overview or detailed).
NewStatPress also includes a widget one can possibly add to a sidebar (or easy PHP code if you can’t use widgets!).

With the new ajax/javascript usage for variables in widget, the plugin is faster for a user being visit your site even with 1GB or more of database to use! (requires the External API be enabled in NewStatPress>Options>API)

IMPORTANT: all previous versions from 1.0.4 are subject to XSS and SQL injection from an old Statpress routine. You have to use at least version 1.0.6 to avoid security issue.
PLEASE UPDATE always to the latest version available.


Check at

What’s new?

Simple adding index to database and changes some data fields for better database storing (from here where some modification comes from)

Ban IP

You could ban IP list from stats editing def/banips.dat file.

DB Table maintenance

NewStatPress can automatically delete older records to allow the insertion of newer records when limited space is present.
This features is left as original StatPress but it will be replaced by the history data instead.

External API

External API are a way to gives the collected informations as a web service using a POST call.
With it you can use (for example) your collected data of WordPress inside a Drupal site.
The API must be enables by check a flag into the option (by default is disabled) and a private KEY must be entered (you can generate a random one).
This KEY is for authenticate the called as a valid allowed client.
Even if the API is for external usage, it will be used internally for speed up page generation using AJAX, so at some point you will need to activate it to continue to see overview and Details pages.

Actually those are the available commands:

Command | Parameters | Description

  • version gives the Newstatpress version in use
  • dashboard gives the Newstatpress dashboard overview table

External API is actually used by Multi-NewStatPress (a software than manages data from multiple installation of NewStatPress in different servers).

If you want to use the API you need to pass to POST those values:

  • VAR the variable for the query (like ‘Version’)
  • KEY the MD5 of date at minute level plus the key you enter into option (e.g in PHP: md5(gmdate(‘m-d-y H i’).key) )
  • PAR the parameter associated with the VAR
  • TYP the type of result: JSON (default) of HTML

into those url: your_site+”/wp-content/plugins/newstatpress/includes/api/external.php”

NewStatPress Widget / NewStatPress_Print function

Widget is customizable. These are the available variables:

  • %thistotalvisits% – this page, total visits
  • %alltotalvisits% – all page, total visits
  • %totalpageviews% – total pages view
  • %monthtotalpageviews% – total pages view in the month
  • %todaytotalpageviews% – total pages view today
  • %since% – Date of the first hit
  • %visits% – Today visits
  • %yvisits% – Yesterday visits
  • %mvisits% – Month visits
  • %wvisits% – Week visits
  • %totalvisits% – Total visits
  • %os% – Operative system
  • %browser% – Browser
  • %ip% – IP address
  • %visitorsonline% – Counts all online visitors
  • %usersonline% – Counts logged online visitors
  • %toppost% – The most viewed Post
  • %topbrowser% – The most used Browser
  • %topos% – The most used O.S.
  • %topsearch% – The most used search terms

Now you could add these values everywhere! NewStatPress offers a new PHP function NewStatPress_Print().
* i.e. NewStatPress_Print(“%totalvisits% total visits.”);

New experimental functions: place this command [NewStatPress: xxx] every were in your WordPress blog pages and you will have the graph about the xxx function.

Available functions are:
* [NewStatPress: Overview]
* [NewStatPress: Top days]
* [NewStatPress: O.S.]
* [NewStatPress: Browser]
* [NewStatPress: Feeds]
* [NewStatPress: Search Engine]
* [NewStatPress: Search terms]
* [NewStatPress: Top referrer]
* [NewStatPress: Languages]
* [NewStatPress: Spider]
* [NewStatPress: Top Pages]
* [NewStatPress: Top Days – Unique visitors]
* [NewStatPress: Top Days – Pageviews]
* [NewStatPress: Top IPs – Pageviews]


Fresh Install

Upload “newstatpress” directory in wp-content/plugins/ . Then just activate it on your plugin management page.
You are ready!!!

Note: you must disable the original StatPress plugin (or other plugins still based onto StatPress) when activating this, as it still use or now the same table of StatPress for storing data in DB (copy the data to another table will be very space consuming for your site, so it was better to use the same table)


  • Deactivate NewStatPress plugin (no data lost!)
  • Backup ALL your data
  • Backup your custom DEFs files
  • Override “newstatpress” directory in wp-content/plugins/
  • Restore your custom DEFs files
  • Re-activate it on your plugin management page
  • In the Dashboard click “NewStatPress”, then “NewStatPressUpdate” and wait until it will add/update db’s content

Plugin author

Stefano Tognon and cHab (from Daniele Lippi works)

Plugin official website address
If you encounter problems in using the NewStatPress plugin, you can comment below, and I will try my best to help you solve the problem

Leave a Comment

Your email address will not be published.