Danny van Kooten develops the WordPress Plugin Mailchimp for WordPress - with currently almost two million active installations. Thanks to lean development, the expansion will save an estimated 59,000 kg of CO2 per month. We talked to Danny about efficient programming and sustainable WordPress.
The Internet, WordPress and WordPress hosting consume a lot of energy. How "green" is the leading content management system? And what contribution can we all make to this, whether as developers or in the application of WordPress ? Nine questions to Danny about his initiative CO2 emissions on the web.
Sustainability WordPress : Be part of it
Danny, proper website programming can significantly reduce CO2 emissions. How exactly does the saving work?
Viewing a website means downloading a collection of files to your computer after which your internet browser processes these files to render them on your screen. The smaller these files are, the less data is transferred over the internet, which saves energy across all the nodes in the network between your computer and the computer the website is hosted on.
So when building a website that has many visitors, it can really pay off to spend some time ensuring the website is as small as possible because even a tiny reduction in size can really add up.
Which optimizations in which language have the greatest leverage?
The energy cost of transferring a file over the internet also depends on which network is used. A fixed internet connection is much more efficient than a wireless mobile connection. That’s why the biggest leverage is probably in optimizing your mobile website to serve lower resolution images and videos.
You saved an estimated 59,000 KG CO2 per month with Mailchimp for WordPress. Can you do the math for our readers?
Since the plugin is activated on about 2 million websites, this saves about 40 GB of data transfer if every website received exactly 1 visitor. Multiply that by an estimated average of 10.000 monthly visitors per website and we get a saving of about 400.000 GB per month.
At an estimated 0.5 kWh per GB of data transfer and 295 gram of CO2 per kWh of energy, this means this 20 kB reduction saves approximately 0.5 * 0.295 * 400.000 = 59000 kg of CO2 per month in total.
I am making a lot of assumptions here about the number of monthly visitors per website, how well devices are caching files and what networks are being used. My main intention was not about providing an exact number though, it was to show how it can be really efficient to think about CO2 savings in our work too and not just in other areas of our lives.
How do you manage to regularly think about potential CO2 savings in your programming process?
In my plugins I make sure to be very cautious about pulling in third-party libraries whenever I am working on a file that is to be loaded on the public facing section of a website that has the plugin activated. With the rise of NPM and CDN’s it has become super easy to pull-in a dependency.
- A rough idea of how languages work at a lower level
- To know: Which algorithms come into play when using a function of the language in which you program?
Both are useful in deciding which tools are right for the job. Learning some C is great for that, as it’s a language in which you have to take care of many of the details that other languages have abstracted away for you.
What tools are there to make the code leaner and more efficient?
To check the sustainability of a WordPress Plugin or Theme as a user you can do the following: The easiest method is to run Chrome Lighthouse before activating the theme or plugin you’re thinking of running and then running it again once the theme or plugin is activated and configured. You can then consider if the regression in performance is worth it.
How can you make Newsletters attractive but still as resource-saving as possible?
I would recommend to send plain-text emails whenever possible. They are less likely to end up in spam and study after study shows they result in better conversion rates too. That and they use fewer resources, so it’s a win-win!
What are the most important levers for us all in everyday online life to save CO2?
The most important lever is the emissions you enforce on others without them having any control over it. You can configure your streaming software to load lower-resolution videos but the effect would be far bigger if our streaming software did this for us. A website is no different.
A few words about you and your plugins?
I’ve been working with WordPress since before it had post types and published my first plugin a little over a decade ago. As of 2013 I am working with a small and remote team and building WordPress plugins on a full-time basis. These days we are mostly focusing on building plugins that make your website more efficient or less privacy-intrusive, like our newest plugin Koko Analytics at WordPress.org.