Plugin WordPress per mostrare card repository GitHub/Forgejo tramite shortcode
  • PHP 89.6%
  • CSS 10.4%
Find a file
2026-06-02 21:54:15 +02:00
assets/css v1.3.3: badge ? inline nella riga azioni, margin-left auto 2026-06-02 15:48:28 +02:00
includes v1.4.5: generation counter cache invalidation — bypasses Redis selective flush 2026-06-02 21:51:42 +02:00
languages v1.4.0: refactor i18n — English msgids, Italian translation via it_IT.mo 2026-06-02 21:20:33 +02:00
.distignore v1.2.6: aggiungi .distignore per escludere README.it-IT.md e .gitignore dall'installazione WP 2026-06-02 13:38:58 +02:00
CHANGELOG.md v1.4.5: update all docs — CHANGELOG, README EN/IT, readme.txt 2026-06-02 21:54:15 +02:00
eg-ranking-repo.php v1.4.5: generation counter cache invalidation — bypasses Redis selective flush 2026-06-02 21:51:42 +02:00
README.it-IT.md v1.4.5: update all docs — CHANGELOG, README EN/IT, readme.txt 2026-06-02 21:54:15 +02:00
README.md v1.4.5: update all docs — CHANGELOG, README EN/IT, readme.txt 2026-06-02 21:54:15 +02:00
readme.txt v1.4.5: update all docs — CHANGELOG, README EN/IT, readme.txt 2026-06-02 21:54:15 +02:00
screenshot-1.png v1.3.4: screenshot, README IT/EN aggiornati con tutte le feature 2026-06-02 16:02:54 +02:00
uninstall.php v1.2.2: Plugin Check compliance, rimuovi load_plugin_textdomain, aggiungi .mo 2026-06-02 12:43:19 +02:00

EG Ranking Repo

Version License WordPress PHP

WordPress plugin that displays a compact card with repository data from GitHub or Forgejo via shortcode.

Card example


Features

  • Responsive card, as wide as the post column
  • Unified action row: Website · Source Code · Date · Version · Stars · ?
  • Version badge from the latest release; falls back to the latest git tag
  • Localised tooltips on every element (based on WordPress language)
  • ? badge linking to the plugin repository
  • Transient cache with configurable duration (default 6 hours)
  • Anti-SSRF protection via wp_safe_remote_get()
  • Customisable colours from the admin settings page
  • Internationalised (it_IT included)

Installation

  1. Upload the eg-ranking-repo folder to wp-content/plugins/
  2. Activate the plugin from the WordPress Plugins page
  3. Configure the options under Settings > EG Ranking Repo

Automatic updates

Install EG Forgejo Updater to receive automatic updates directly inside WordPress.


Usage

Insert the shortcode in any page, post, or widget:

[eg-ranking-repo url="https://github.com/owner/repo"]
[eg-ranking-repo url="https://git.emanuelegori.uno/owner/repo"]

Works with GitHub and any self-hosted Forgejo or Gitea instance.


Card Data

Field Source
Repository name full_name API field
Description description API field
Website homepage / website of the repo
Source Code URL passed in the shortcode
Last updated updated_at
Version Latest release tag; falls back to git tag
Stars stargazers_count / stars_count

If no website is set in the repository, the button is shown as disabled.


Configuration

Go to Settings > EG Ranking Repo:

  • GitHub Personal Access Token: without a token the limit is 60 requests/hour. With a personal token it rises to 5,000/hour and enables access to private repositories.
  • Forgejo API Token: required only for private repositories or instances with mandatory authentication.
  • Cache duration: data is cached via WordPress transients. Default: 6 hours.
  • Colours: customise card background, card text, button background and button text.
  • Remove token: delete a compromised token without accessing the database.

File Structure

eg-ranking-repo/
├── eg-ranking-repo.php          WP header, constants, bootstrap
├── uninstall.php                Options and transient cleanup on uninstall
├── screenshot-1.png             Card screenshot
├── includes/
│   ├── class-egr-main.php       Init, EG Forgejo Updater hook
│   ├── class-egr-api.php        GitHub/Forgejo API calls, cache, formatting
│   ├── class-egr-shortcode.php  Shortcode and card HTML rendering
│   └── class-egr-settings.php  wp-admin settings page
├── assets/
│   └── css/
│       └── eg-ranking-repo.css  Frontend card styles
└── languages/
    ├── eg-ranking-repo.pot      Translation template
    └── eg-ranking-repo-it_IT.po Italian translation

Changelog

[1.4.5] - 2026-06-02

  • Cache invalidation via generation counter — reliable with Redis selective flush

[1.4.x] - 2026-06-02

  • i18n refactor: English msgids, it_IT.mo Italian translations
  • Version badges in README, unified EN/IT structure
  • Plugin header description in English
  • Screenshot with absolute URL in readme.txt

[1.3.x] - 2026-06-02

  • Version badge from API releases/tags
  • Unified action row: Website · Source Code · Date · Version · Stars · ?
  • ? badge linking to plugin repository
  • Card full-width responsive

[1.2.x] - 2026-06-02

  • Plugin Check compliance fixes
  • HTTPS forced for Forgejo API, error caching, uninstall.php

Licence

GPL-2.0-or-later — https://www.gnu.org/licenses/gpl-2.0.html


Author

Emanuele Goriemanuelegori.uno