Plugin info

Total downloads: 27,706
Active installs: 300
Total reviews: 0
Average rating: 0
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 1
Last updated: 3/10/2009 (6187 days ago)
Added to WordPress: 3/10/2009 (16 years old)
Minimum WordPress version: 2.7.1
Tested up to WordPress version: 2.7.1
Minimum PHP version: f

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 6187 days ago

20/100

Is Simple Hit Counter abandoned?

Possibly abandoned (last update 6187 days ago).

Compatibility

Requires WordPress: 2.7.1
Tested up to: 2.7.1
Requires PHP: f

Developers

Languages

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

Post Views Counter
Rating 4.9/5 (1,170 reviews)Active installs 200,000
WP-PostViews
Rating 4.4/5 (65 reviews)Active installs 100,000
SlimStat Analytics
Rating 4.8/5 (814 reviews)Active installs 80,000
StatCounter – Free Real Time Visitor Stats
Rating 4.0/5 (47 reviews)Active installs 70,000
Koko Analytics – Privacy+Friendly statistics for WordPress
Rating 5.0/5 (212 reviews)Active installs 60,000
Simple Download Monitor
Rating 4.6/5 (146 reviews)Active installs 20,000

Description

This is the simplest hit counter I could imagine (well, almost). Every time a
page is requested, it adds one to the count. The display is not an image, just
text. There is no javascript to hit some third-party server, no tracking, no
distinction among pages: just an old-fashioned site counter CGI, implemented in
WordPress. The plugin stores its count in its own MySQL table.

Once the plugin is installed (described below), you can display the count by
putting code like this somewhere on your page:


That will both increment the counter and display its value. There is no method
for getting the value without incrementing it. I suppose I could write such a
thing if anyone likes.

There is a minor race condition. First the plugin updates the database by one
(atomically), then it queries for the current count. Therefore in heavy traffic
it is possible for two updates to happen before either select. In that case,
the counter will correctly increment, but the number displayed may be the same
for each user, representing the total page hits. As far as I can tell, this
race condition is inevitable without locking the table. It seems trivial
enough, though I guess you should be warned if you run a contest to give away a
free car to the 1,000,000th user.

By default the plugin keeps its data in a table called wp_simplehitcounter_hits.
You can change this by editing the simplehitcounter.php file.

Installation

Installing the plugin is easy and follows the standard steps:

  1. Upload simplehitcounter.php to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Place <?= simplehitcounter_hit(); ?> somewhere like the footer or sidebar.

Frequently Asked Questions

Why did you write such a boring plugin?

Why do you ask such boring questions?

Why didn’t you use the other plugin x?

I looked around, but everything seemed too fancy. Besides, I wanted a chance to
write my own WordPress plugin.

Review feed

No reviews available

Screenshots

No screenshots available

Changelog

No changelog available