| 开发者 | yedaye |
|---|---|
| 更新时间 | 2026年8月20日 05:51 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
[lwakit_eco_badge] shortcode and a matching Gutenberg block render an inline-SVG "Eco-Friendly Site" badge (zero extra image requests) in 3 style variants, with a settings-based default and a live-preview customizer.lwakit-carbon-footprint-tracker folder to /wp-content/plugins/, or install the plugin zip through Plugins → Add New → Upload Plugin.[lwakit_eco_badge] shortcode or the "Lwakit Eco Badge" block to any page or post.They are estimates, not precise measurements. Lwakit Carbon Footprint Tracker uses the published Sustainable Web Design Model methodology (energy per gigabyte transferred × a grid carbon-intensity assumption you can edit) combined with real, server-measured page weight from your own site's traffic. Actual emissions vary by visitor device, network path, and local energy mix, and no software can measure true end-to-end emissions without instrumenting every device and network hop involved. Treat the numbers as a consistent, comparable trend indicator rather than an audited absolute figure.
Lwakit Carbon Footprint Tracker only measures pages that are already being rendered — it buffers the page output to count its size and reads file sizes already known to WordPress (enqueued scripts/styles, referenced local images), it does not add new database tables to every query, fetch additional remote resources, or block/modify your page output. Metrics are written once per page load using a single upsert query. Your own visits as a logged-in administrator are skipped automatically so testing doesn't add overhead or skew your stats.
By default, none. Green-hosting detection works fully offline against a static list of known providers bundled with the plugin. The only outbound network request Lwakit Carbon Footprint Tracker can make is an optional, opt-in check against the Green Web Foundation's public API, which is off by default — see "External services" below for exactly what that sends.
No. Lwakit Carbon Footprint Tracker aggregates page weight, view counts, and database query counts per page per day. It does not store IP addresses, cookies, or any other visitor-identifying information.
Not in the free version. Lwakit Carbon Footprint Tracker (Free) is intentionally a pure tracking/reporting tool: it measures and reports, and gives you recommendations, but it does not modify your site's assets or behavior. Optimization actions (image conversion, script blocking, caching, report exports) are out of scope for this version.
[lwakit_eco_badge] (was [begreen_badge]) to match the plugin's new name — WordPress shortcode tags can't contain spaces, so this is the closest valid form to "Lwakit Eco Badge".lwakit-carbon-footprint-tracker), per WordPress.org review feedback regarding potential brand confusion with the "BeGreen" name. Updated the display name, Text Domain, and all user-facing UI text accordingly.wp_register_style()/wp_add_inline_style() instead of a raw echo'd <style> tag, per Plugin Check guidance to use WordPress's enqueue APIs for all CSS/JS output.Text Domain header now matches the plugin slug assigned by the WordPress.org review team (begreen-carbon-footprint-tracker), resolving a textdomain_mismatch warning from Plugin Check. Every translation-function call across the plugin (PHP and the Eco Badge block's JS) and block.json's textdomain field were updated to match.class-begreen-admin.php's current_page_slug() — the $_GET['page'] read happened on two separate lines, so a single-line phpcs:ignore only ever covered one of them. Collapsed to a single statement with one ignore comment; re-ran WP-CLI's wp plugin check and confirmed zero remaining findings.apiVersion: 3 in block.json, as required for WordPress 7.0's iframe-based block editor.class-begreen-db.php, class-begreen-recommendations.php and uninstall.php now passes the table name through $wpdb->prepare()'s %i identifier placeholder instead of raw string interpolation.class-begreen-admin.php (a read-only $_GET['page'] navigation check, not a state-changing action) by relocating the existing phpcs:ignore justification onto the exact line PHPCS parses.phpcs:ignore/phpcs:disable comments (with justification) for the direct-database-query and local-template-variable warnings that Plugin Check reports on every custom-table query and every included admin view — both are expected, unavoidable patterns for a plugin with its own table and plain-include view templates, not real issues.object-fit: contain) instead of pre-cropped image files, so the artwork displays correctly without a visible background box.add_menu_page() icon. Replaced it with a properly sized 20x20 icon.