GreenTrace Carbon Rating Badge and Reports

Description

🌍 ESTIMATE your pages’ digital carbon emissions using the Sustainable Web Design Model v4
🏷️ DISPLAY an A-F rating badge on your site
📊 VIEW dashboard analytics and track improvements
📄 GENERATE branded sustainability reports and structured data packs (Pro)

Why GreenTrace?

Understand your website’s estimated digital carbon footprint without sending scan results to GreenTrace or a third-party analytics service.

GreenTrace itself sets no tracking cookies and stores scan results in your WordPress database. Site owners remain responsible for evaluating their own privacy and legal obligations.

Free Features:
– Authorized frontend page scan using browser transfer-size data for HTML, CSS, JavaScript, images, and other loaded resources
– A-F rating badge (3 themes: Green, Minimal, Dark)
– Floating badge or shortcode [greentrace_badge]
– Dashboard widget with site overview
– Admin metabox on edit pages
– Settings page with badge customization
– Monthly emissions estimate based on your pageviews
– No GreenTrace cloud account or external emissions API
– Scan results are stored in your WordPress database

Pro Features:
Available as a separate add-on:
– Branded, print-ready sustainability report that can be saved as PDF
– Structured data pack (CSV + methodology document + JSON)
– Bulk page scanning
– Monthly email digest (based on existing scan data)
– Custom grid carbon profiles (country-specific)

How to Use

  1. Make sure at least one WordPress Page or Post is published.
  2. Go to Settings > GreenTrace and click “Open Frontend Scanner” in the Quick Start panel. You can also edit any published Page or Post and use the “Open Frontend Scanner” button in its GreenTrace metabox.
  3. The published page opens in a new browser tab and GreenTrace measures its transferred resources automatically.
  4. Keep the page open and wait until the status message begins with “Estimated:” and confirms “Scan saved.” Do not close the page while it says that GreenTrace is estimating.
  5. Return to Settings > GreenTrace and refresh the screen. Quick Start will confirm how many pages or posts have scan data.
  6. Review the Site Overview. Change Monthly Pageviews if needed and save the settings.
  7. Click “Generate” under Generate Report. The button remains unavailable until at least one successful scan exists.
  8. Repeat the scan steps for other published Pages or Posts. Reports use the latest successful scan for each item.

The floating badge appears only on content that has a successful scan. If the badge position is set to “Shortcode only”, add [greentrace_badge] to the scanned content.

Installation

  1. Install GreenTrace from Plugins > Add New, or upload the greentrace-carbon-rating-badge-and-reports folder to /wp-content/plugins/.
  2. Activate GreenTrace.
  3. Go to Settings > GreenTrace and follow the Quick Start instructions.
  4. Optionally change the badge position, badge theme, and Monthly Pageviews value, then click Save Changes.

FAQ

How is CO2e estimated?

GreenTrace uses the Sustainable Web Design Model v4. The global calculation is transferred GB × [(0.194 operational kWh/GB × 494 gCO2e/kWh) + (0.106 embodied kWh/GB × 494 gCO2e/kWh)]. Results are estimates rather than direct measurements.

How does the A-F rating work?

The rating is GreenTrace’s presentation scale: A+ below 0.1g, A below 0.3g, B below 0.6g, C below 1.0g, D below 2.0g, and F at 2.0g or more per estimated view. It is not a certification.

Does it call external APIs?

No. All measurements are done client-side via the Performance API. No data leaves your server.

What privacy-related behavior does GreenTrace use?

GreenTrace itself sets no tracking cookies, sends no scan results to GreenTrace or third-party analytics services, and stores results in the site’s WordPress database. This describes the plugin’s behavior and is not a legal-compliance guarantee.

Can I change the badge position?

Yes. Settings > GreenTrace: bottom-right, bottom-left, shortcode only, or hide.

Why is the Generate Report button unavailable?

GreenTrace needs at least one successful frontend scan before it can calculate a report. Follow Quick Start on Settings > GreenTrace, wait for the “Scan saved” confirmation, then return and refresh the settings screen.

Are the reports official carbon audits?

No. GreenTrace provides estimates using the Sustainable Web Design Model. For formal regulatory submissions, consult a qualified carbon accounting professional.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“GreenTrace Carbon Rating Badge and Reports” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.6

  • Added complete Quick Start and readme instructions for configuring, scanning, and reporting from a new installation
  • Added a direct frontend scanner entry point to the GreenTrace settings screen
  • Disabled report generation until at least one successful page or post scan exists
  • Added a server-side empty-report check so direct report links cannot produce misleading all-zero reports
  • Improved scan completion and first-use messages so users know when data is saved and how to generate a report

1.0.5

  • Moved every country-specific electricity factor out of the WordPress.org package and into the separate Pro add-on
  • Updated carbon estimates to the Sustainable Web Design Model v4 operational and embodied methodology
  • Replaced editor-screen measurement with an authorized scan of the actual public page
  • Changed site statistics and reports to use the latest scan for each page or post, preventing repeated scans from inflating totals
  • Improved low-emissions formatting so small positive monthly and annual estimates are displayed in grams instead of zero kilograms
  • Fixed report screen access, removed unrelated admin notices from reports, and eliminated hidden-report PHP deprecation messages
  • Removed the non-functional automatic scan option
  • Tightened capability and nonce checks, server-side input validation, custom-table queries, and SQL wildcard handling
  • Completed customer-facing internationalization and corrected privacy, audit, and emissions claims

1.0.4

  • Removed public-facing attribution from the carbon badge
  • Separated premium report implementation from the free plugin
  • Reworked report and admin assets to use WordPress enqueue APIs
  • Improved input sanitization and contextual output escaping
  • Updated the text domain to match the assigned WordPress.org slug

1.0.3

  • Removed unused vendor libraries (outdated DOMPDF and dependencies)
  • Escape all output properly in admin area
  • Consistent input sanitization across all AJAX handlers
  • Tested up to WordPress 7.0

1.0.1

  • Added country-specific grid carbon intensity (Pro)
  • Fixed data accuracy in reports
  • Performance improvements

1.0.0

  • Initial release