WP-DownloadCounter
Since WordPress does offer attaching downloads to pages, but doesn't keep track of the amount of downloads, this plugin was written.
The facts
- Rating
- 2.5★ from 2
- Active installs
- 100+
- Price
- Free
- Last updated
- 22 Apr 2009
- Added
- Dec 2008
- Requires WP
- 2.0.2
- Tested up to
- WP 2.7.3
- Downloads
- 22,484
Our analysis
AI-assistedWP-DownloadCounter is a WordPress plugin designed to track the number of downloads for files attached to your site. It records the total download count, the last download time, and allows you to reset the counter. The plugin can be used with both internal and external URLs, and it supports custom URL formats.
You can display download statistics in your posts using shortcodes, which can show the download URL, count, file size, and last modified date. Additionally, it provides a PHP function to retrieve download information for use in templates or custom plugins.
Best for: This plugin suits users who need a simple solution for tracking file downloads on their WordPress site.
What it does well
- ✓Tracks download counts and last download times
- ✓Allows resetting of download counters
- ✓Supports both internal and external URLs
- ✓Provides shortcodes for easy integration in posts
- ✓Includes a PHP function for retrieving download information
Where it falls short
- •Last updated in April 2009, may not be compatible with newer WordPress versions
- •Low rating and directory score indicate potential issues
- •Limited feature set focused solely on download tracking
Verdict
WP-DownloadCounter offers basic download tracking functionality, but its outdated status and low ratings may limit its appeal for modern WordPress users.
From the developer
r-win's own description of WP-DownloadCounter, lightly tidied.
Since WordPress does offer attaching downloads to pages, but doesn’t keep track of statistical information about these downloads, I wrote this plugin.
I should mention statistical information is a big word for just another download counter, since that is main purpose of this plugin.
Features:
- Keeps track of the amount of downloads of a certain file.
- Keeps track of the last download time
- Allows you to reset the counter
- Allows you to add counters to both internal and external urls
- Can use fancy urls (like /downloads/file.zip)
- Can print the amount of downloads, the filesize and the last modified date in a post.
Arbitrary section
Using tags in your posts
When writing a post or a page, you may want to add the URL or the amount of downloads in your post. Using [ download(downloadname) ] (without the spaces) will be replaced with the download url, [ downloadcounter(downloadname) ] will be replaced with the amount of downloads, [ downloadsize(downloadname) ] will print the size of the download (in GB, MB, kB or B), [ downloadupdated(downloadname) ] will print the last modified date, using the WordPress setting you’ve specified for the date format. When creating a link, you could, for instance, use Download (of course, again, without the spaces within the [] brackets).
Finally, when using downloadsize of downloadupdated, you can specify one extra argument. With downloadsize, you can add ,false to prevent the usage of the GB, MB, kB or B postfixes. So, for example, using [ downloadsize(file.zip, false) ] will just display the size in bytes. With downloadupdated, you can enter a PHP date format string as extra argument. For example, [ downloadupdated(file.zip, d-m-Y) ] will display a date like 27-11-2008.
Retrieving download information from PHP
Since version 0.6 is it possible to get information about the downloads using PHP, so you can use this information directly in your templates or in you own plugins. Only one function is important at the moment:
download_information($download_name, $return_information = DOWNLOAD_URL | DOWNLOAD_AMOUNT)
This function will return an array with the requested information. You can specify what information to return by the argument $return_information. The file downloadcounter-options.php contains the correct define statements which can be used. Currently only URL, Amount, Size and Last Modified Date are available.
Using the code
$info = download_information(wp-downloadcounter.zip, DOWNLOAD_URL | DOWNLOAD_AMOUNT | DOWNLOAD_SIZE | DOWNLOAD_LASTMODIFIED);
var_dump($info);
returns:
array(4) { ["url"]=> string(73) "http://projects.bovendeur.org/downloads/wp-downloadcounter.zip" ["amount"]=> string(4) "1878" ["size"]=> int(11006) ["lastmodified"]=> int(1228157426) }