WordPress Carbon Footprint is a simple plugin for WordPress which works out and displays the carbon footprint of your blog. It works out how many words and images are on your blog and then calculates how many sheets of paper it would take to print a copy of your blog. It finally works out how much carbon is in those sheets of paper and displays all this information for you or your readers so you can show off how much carbon you’re offsetting by hosting your content online instead of printing it.
Installation
1. Extract & upload the carbon-footprint folder to your ‘/wp-content/plugins/’ directory.
2. Activate the plugin via the Plugins menu in WordPress.
3. Navigate to Design -> Theme Editor -> Sidebar.php (or whichever page you like) and insert this code wherever you want your carbon footprint displayed:
<?php carbonfootprint_display_footprint(); ?>
Thats it! Your carbon footprint details should show up wherever you pasted the code. The sidebar is a good place because it’s on every page. You can specify the detail to print out by calling carbonfootprint_display_footprint(’Small’); carbonfootprint_display_footprint(’Medium’); carbonfootprint_display_footprint(’Large’); or carbonfootprint_display_footprint(’Extended’);
Small will display something like this:
42.4g
While Medium will display something like this:
Words: 12323 (18.9g)
Images: 2 (0.70g)
Pages: 19.6
Carbon: 0.15g
And Large will display a table like this:
| Count | Pages | Carbon | |
| Words | 12323 | 19.4 | 0.15g |
| Images | 2 | 0.71 | 0.01g |
| Total | 20.11 | 0.16g |
How are the figures worked out?
The script searches through every post and every page on your blog, counting the total number of words and images in each post.
It then works out how many pages the text would take up assuming a standard of 794 words per page. This was worked out by taking the most widely used fonts, font sizes, the word processor being used and other print options.
It also works out how many pages the images would take up, again based on DPI, margins and other factors.
The most widely used paper is around 120gsm (grams per square meter) and standard A4 paper is 210×297mm. This means that we can approximate that there is 0.0074844g of carbon per sheet of paper which we multiply by our number of pages to give the total amount carbon saved by the blog vs it being printed out on paper.
While it is by no means fully accurate, it does give a reasonable approximation as to how much carbon your blog would take up if you printed it onto standard printer paper.
Demo & Download
This plugin is active on SeanBluestone.com and you can view it in the sidebar to the right near the bottom.
You can download the WordPress Carbon Footprint plugin here.
You can discuss this article and see what others are saying about it in the WordPress Discussion Forum
Did you find this article useful? Why not buy Sean a coffee?

24 comments ↓
Nice plugin, how can only count the images in every post?
thanks in advance
hi. Thanks for plugin
perfect.
There is a typo in the documentation.
Step 3 for the installation should list the calling function as: .
There is currently an extra underscore(_) in between carbon and footprint which causes an error.
Great plugin after this was fixed !
ooops. should have handled the script better. Here it is in readable format.
Replace : carbon_footprint_display_footprint
With : carbonfootprint_display_footprint
Great plugin, many thanks indeed.
Once the extra underscore is removed it works tip-top.
Can (or how) it shows all that onto single page/post? How’s dynamic sidebar, even I hate to put too much info there?
How can I specify what color to use for the output? In my current theme, it’s gray on dark gray so it’s barely legible.
Hello!
Very Interesting post! Thank you for such interesting resource!
PS: Sorry for my bad english, I’v just started to learn this language
See you!
Your, Raiul Baztepo
Thanks a lot for this interesting and very useful plug in!
Trackbacks
Leave a Comment