A card with the data of a project that stays up to date: a repository on GitHub, Codeberg, Forgejo or Gitea, or a WordPress.org plugin. Version, download, stars and ratings come in on their own. https://emanuelegori.uno/en/plugins/eg-repo-card/
  • PHP 90.1%
  • CSS 5.3%
  • HTML 3.8%
  • Python 0.8%
Find a file
Emanuele Gori 8ae3e76f29
All checks were successful
Auto Release on version bump / release (push) Successful in 8s
docs: WordPress.org icon and banner (with HTML sources)
2026-10-01 23:05:03 +02:00
.forgejo/workflows ci: workflow auto-release su bump versione (tag + note CHANGELOG + zip) 2026-06-15 22:38:05 +02:00
.wordpress-org docs: WordPress.org icon and banner (with HTML sources) 2026-10-01 23:05:03 +02:00
assets/css fix: card follows content width, 0 for unrated plugins (2.1.3) 2026-10-01 21:55:45 +02:00
includes fix: card follows content width, 0 for unrated plugins (2.1.3) 2026-10-01 21:55:45 +02:00
languages feat: settings page footer like eg-social-timeline (2.1.2) 2026-10-01 21:00:39 +02:00
.gitattributes feat!: rename to EG Repo Card 2.0.0 2026-10-01 07:09:56 +02:00
CHANGELOG.md fix: card follows content width, 0 for unrated plugins (2.1.3) 2026-10-01 21:55:45 +02:00
changelog.txt feat!: rename to EG Repo Card 2.0.0 2026-10-01 07:09:56 +02:00
eg-repo-card.php fix: card follows content width, 0 for unrated plugins (2.1.3) 2026-10-01 21:55:45 +02:00
LICENSE.md feat!: rename to EG Repo Card 2.0.0 2026-10-01 07:09:56 +02:00
README.it-IT.md fix: card follows content width, 0 for unrated plugins (2.1.3) 2026-10-01 21:55:45 +02:00
README.md fix: card follows content width, 0 for unrated plugins (2.1.3) 2026-10-01 21:55:45 +02:00
readme.txt fix: card follows content width, 0 for unrated plugins (2.1.3) 2026-10-01 21:55:45 +02:00
uninstall.php feat!: rename to EG Repo Card 2.0.0 2026-10-01 07:09:56 +02:00

EG Repo Card

Version License WordPress PHP

WordPress plugin that shows a card with the data of a GitHub, Codeberg, Forgejo or Gitea repository, or of a plugin in the WordPress.org directory: latest version, download button, stars or rating.

Italiano: README.it-IT.md

Repository cards from Forgejo, Codeberg, GitHub and Gitea

Formerly EG Ranking Repo. Version 2.0.0 renames the plugin. See Upgrading from EG Ranking Repo.


Features

  • Responsive card, as wide as the content column
  • Platform logo for GitHub, Codeberg, Forgejo and Gitea (Forgejo and Gitea are told apart automatically)
  • Buttons: Website · Source Code · Download
  • Badges: last update · version · language · license · stars, each with a tooltip
  • Download button: the .zip attached to the latest release, or the release page
  • Version from the latest release; falls back to the latest git tag
  • "Archived" label for read-only repositories
  • Cards for WordPress.org plugins: icon, plugin page, download, tested WordPress version, active installations, rating, "Closed" label
  • Appearance: neutral preset, transparent, custom color or follow the visitor browser (light/dark), for the card and for the buttons; text adapts to the background
  • Optional border, shadow and owner avatar
  • Transient cache (default 6 hours); when an API does not answer, the last data received stays on the card
  • Errors visible only to editors, never to visitors
  • Inline SVG icons, no CDN or external fonts
  • Internationalised (Italian included)

Usage

[eg-repo-card url="https://github.com/owner/repo"]
[eg-repo-card url="https://codeberg.org/owner/repo"]
[eg-repo-card url="https://git.example.com/owner/repo"]
[eg-repo-card url="https://wordpress.org/plugins/plugin-slug/"]

Card data

Element Source
Name full_name
Description description
Website homepage (GitHub) / website (Forgejo, Gitea)
Source Code URL written in the shortcode
Download single .zip asset of the latest release, else the release page
Last update updated_at
Version latest release tag; falls back to the latest git tag
Language language
License license.spdx_id (GitHub) / licenses (Forgejo, Gitea)
Stars stargazers_count / stars_count
Archived archived

Without a website the button stays visible, greyed out. Language, license, version and Download appear only when the platform provides them.

WordPress.org plugins

Element Source (plugins/info/1.2 API)
Name, icon name, icons
Description short_description
Website homepage (hidden when it is the WordPress.org page)
Plugin page URL written in the shortcode
Download download_link
Last update last_updated
Version version
Tested up to tested
Installations active_installs
Rating rating (out of 5) and num_ratings in the tooltip
Closed closed

Screenshots

WordPress.org plugin cards Dark mode
WordPress.org plugin cards "Follow the visitor browser" in dark mode

Settings

Settings page

Settings > EG Repo Card

  • GitHub personal access token: raises the limit from 60 to 5,000 requests per hour.
  • Forgejo or Gitea token: only for private repositories or instances that require login.
  • Cache duration: 1 to 168 hours, default 6. The page also has a button to flush the cache.
  • Card background / Button background: neutral preset, transparent, follow the visitor browser, custom color.
  • Border, Shadow, Avatar: on/off. Avatar shows the owner avatar or the plugin icon, loaded from the platform that hosts it.

Filters

Filter Use
eg_repo_card_platform_label change the platform label (label, host, platform)
eg_repo_card_language_colors add or change language colors (lowercase name → hex)

egr_platform_label (1.x) still works but is deprecated.


Upgrading from EG Ranking Repo

  1. Deactivate EG Ranking Repo.
  2. Install and activate EG Repo Card: cache duration, colors and tokens are imported.
  3. Check your cards. [eg-ranking-repo] shortcodes keep working but are deprecated: replace them with [eg-repo-card].
  4. Delete EG Ranking Repo.

The text color settings are gone: the text now adapts to the background.


External services

The plugin contacts only the hosts written in your shortcodes (GitHub API, Codeberg, Forgejo or Gitea instances, WordPress.org API) to read public data. Details are in the External services section of readme.txt.


File structure

eg-repo-card/
├── eg-repo-card.php                       Header, constants, bootstrap
├── uninstall.php                          Options and transient cleanup
├── includes/
│   ├── class-eg-repo-card-main.php        Hooks
│   ├── class-eg-repo-card-settings.php    Options and defaults
│   ├── class-eg-repo-card-migration.php   Import from EG Ranking Repo 1.x
│   ├── class-eg-repo-card-api.php         API calls and cache
│   ├── class-eg-repo-card-style.php       CSS of the appearance settings
│   ├── class-eg-repo-card-shortcode.php   Shortcode and card markup
│   └── class-eg-repo-card-admin.php       Settings page
├── assets/css/eg-repo-card.css            Card layout
└── languages/eg-repo-card.pot             Translation template

Changelog

[2.1.3] - 2026-10-01

  • The card follows the width of the post content
  • Plugins without ratings show 0

[2.1.2] - 2026-10-01

  • Footer on the settings page: documentation, repository, donations, version and license

[2.1.1] - 2026-10-01

  • The update date follows the WordPress date format
  • Language dots easier to see on dark backgrounds
  • Screenshots

[2.1.0] - 2026-10-01

  • Cards for WordPress.org plugins: plugin page, download, tested WordPress version, active installations, rating, "Closed" label
  • The Avatar option also shows the plugin icon

[2.0.1] - 2026-10-01

  • Fixed automatic updates

[2.0.0] - 2026-10-01

  • Renamed from EG Ranking Repo; new [eg-repo-card] shortcode, [eg-ranking-repo] deprecated alias
  • Settings imported from EG Ranking Repo
  • Appearance: neutral, transparent, custom or browser-driven backgrounds; border, shadow, avatar
  • Platform logos, Gitea detection, Download button, language, license, "Archived" label
  • Relative time in the date tooltip
  • Last good data shown when an API fails; errors only for editors
  • Removed the "?" badge and the text color settings

The 1.x history is in changelog.txt.


License

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


Author

Emanuele Gori — emanuelegori.uno