GitHub Release Stats releases
WordPress plugin for displaying GitHub stars, release downloads, latest versions, and release dates using shortcodes.
by Abdallah Aboelmagd · github.com/fat7i2017/github-release-stats · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/fat7i2017/github-release-stats/releases/download/v0.1.1/github-release-stats-v0.1.1.zipReadme
GitHub Release Stats
GitHub Release Stats is a lightweight WordPress plugin for displaying GitHub stars, release download counts, latest release versions, and release dates using simple shortcodes.
Built by Abdallah Aboelmagd
Website: https://abdallahaboelmagd.com
GitHub: https://github.com/Fat7i2017
Buy Me a Coffee: https://www.buymeacoffee.com/fat7i2017
What problem it solves
If you publish software on GitHub, the numbers on your website can go stale fast. GitHub Release Stats helps you display live repository stars, release asset downloads, latest versions, and release dates inside WordPress without manually updating those values.
Features
- Display GitHub repository stars
- Display total release asset downloads
- Filter downloads by extension or keyword
- Display the latest release tag or version
- Display the latest release date
- Support relative dates like
just now,2 hours ago, or3 weeks ago - Cache GitHub API responses with WordPress transients
- Use an optional GitHub API token to reduce rate-limit issues
- Clear cached values and test GitHub connectivity from WordPress admin
Installation
- Download the latest plugin ZIP from the GitHub releases page.
- In WordPress admin, go to
Plugins -> Add New -> Upload Plugin. - Upload the ZIP file and activate the plugin.
- Go to
Settings -> GitHub Release Stats. - Optionally add a GitHub API token and set a default cache duration.
Quick start
- Copy one of the shortcodes below.
- Replace
your-github-nameandyour-repo. - Paste the shortcode into a post, page, widget, or any shortcode-enabled content area.
Shortcode examples
Show release downloads
[github_release_downloads owner="your-github-name" repo="your-repo" assets=".dmg,.exe,.zip"]
Show stars
[github_repo_stars owner="your-github-name" repo="your-repo"]
Show both downloads and stars
[github_project_stats owner="your-github-name" repo="your-repo" assets=".dmg,.exe,.zip"]
Show latest version
[github_latest_release owner="your-github-name" repo="your-repo"]
Show relative release date
[github_latest_release_date owner="your-github-name" repo="your-repo" format="relative"]
Show a formatted release date
[github_latest_release_date owner="your-github-name" repo="your-repo" format="F j, Y"]
Attribute reference
owner: GitHub username or organizationrepo: GitHub repository nameassets: Comma-separated file extensions or keywords to countcache: Optional cache duration in secondsformat: Userelativeor a normal PHP date format for release dates
Example with cache override:
[github_release_downloads owner="your-github-name" repo="your-repo" assets=".dmg,.exe,.zip" cache="1800"]
This counts matching release assets only. It does not count GitHub source code downloads.
Cache explanation
- Default cache duration is
1800seconds, which is 30 minutes - You can change the default in
Settings -> GitHub Release Stats - You can override cache duration per shortcode
- If the GitHub API fails, the plugin uses cached values when available
- If no cached value exists yet, the plugin safely returns
0 - Raw GitHub API errors are never shown to public visitors
GitHub token explanation
- A GitHub API token is optional
- It is stored server-side in WordPress options
- It is never exposed on the frontend
- It helps avoid GitHub API rate limits on busier sites or during frequent refreshes
Rate limits
GitHub applies API rate limits to unauthenticated requests. For small or low-traffic sites, the plugin often works fine without a token. For more reliable refreshes, especially across multiple pages or repos, adding a token is recommended.
Support
- Email: me@fat7i2017.com
- GitHub Issues: https://github.com/Fat7i2017/github-release-stats/issues
For bugs, feature requests, or support, you can open a GitHub issue or send an email.
Screenshots
- Polished WordPress admin settings page
- Simple shortcode examples and attribute reference
- Static landing page included in the repository
- Social carousel assets included in
/social-carousel
FAQ
Does this plugin work with any GitHub repository?
Yes, as long as the repository is public and the GitHub API can access its releases and metadata.
Does it count source code downloads from GitHub release pages?
No. It counts matching release assets only.
Can I filter by file type?
Yes. Use the assets attribute with values such as .dmg, .exe, .zip, .pkg, .deb, .rpm, .AppImage, .msi, mac, or windows.
What happens if GitHub is temporarily unavailable?
The plugin falls back to the most recently cached value. If there is no cached value yet, it returns 0.
Does this plugin add credits to my website automatically?
No. It does not inject creator credits into frontend output.
Contributing
Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request.
Known limitation
GitHub does not provide real-time webhook events for every release asset download. Download counts are refreshed using cached GitHub API requests.
Credits
Built by Abdallah Aboelmagd
Website: https://abdallahaboelmagd.com
GitHub: https://github.com/Fat7i2017
Email: me@fat7i2017.com
Buy Me a Coffee: https://www.buymeacoffee.com/fat7i2017
License
GPL-2.0-or-later. See LICENSE.
Read the full README on GitHub →