Danny van Kooten develops the WordPress plugin Mailchimp for WordPress - with currently almost two million active installations. Through lean development, the extension saves 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, whether as developers or in the use of WordPress? Nine questions to Danny about his initiative CO2 emissions on the web.
Sustainable WordPress: Be part of it
Danny, efficient WordPress projects help climate protection. How does the saving work?
To view a web page, a series of files must be downloaded onto the computer. The browser then processes these files to display them on the screen ("render"). The smaller these files are, the less data is transmitted over the internet. This saves energy at all nodes in the network - i.e. between the computer and the server hosting the website.
Sustainable WordPress development
If a website has a lot of visitors, then it pays off enormously to keep it as lean as possible. Because even a minor optimisation adds up this way.
Which optimisations for which languages or formats have the greatest influence?
For this reason, the biggest lever is probably to optimise your website to provide lower resolution images and videos.
Optimise WordPress plugin
Mailchimp for WordPress saves about 59 tonnes of CO2 per month. How do you arrive at this figure?
Since the plugin is activated on about two million websites, this saves about 40 GB of data transfer if each website has exactly one visitor. If you now multiply this by an estimated average of 10,000 monthly visitors per website, you arrive at a saving of about 400,000 GB per month.
Assuming 0.5 kWh per GB of data transmission and 295 grams of CO2 per kWh of energy, this means that the reduction of 20 kB saves a total of approx. 0.5 * 0.295 * 400,000 = 59,000 kg of CO2 per month.
I make a lot of assumptions here about the number of monthly visitors per website, how well devices cache files and what networks are used. However, my main intention was not to give an exact figure. But to show how efficient it can be to think about CO2 savings in our work as well. And not only in other areas of life.
How do you manage to build potential savings into your development process?
With my WordPress plugins, I am very careful about retrieving third-party libraries. Namely, whenever I'm working on a file that needs to be loaded into the publicly accessible area of a website where the plugin is enabled. With the advent of NPM and CDN, it has become very easy to build in a dependency.
- A rough idea of how lower-level languages work
- To know: What algorithms come into play when using a function of the language you are programming in?
Both are useful when deciding which tools are right for the job. Learning C is ideal for this. Because C is a language in which you have to take care of many details that other languages take away from you or have abstracted.
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 way is to run Chrome Lighthouse before activating a theme or plugin extension. Then run it again once the extension is activated and configured. This way, everyone can decide for themselves whether the function is worth the drop in performance.
My recommendation: Send emails in plain text format whenever possible. These are less likely to end up in the spam folder. Moreover, study after study shows that plain text also leads to better conversion rates. And of course, such emails consume fewer resources - so it's a win-win situation!
What are the most important levers in everyday online life to save CO2? Also away from WordPress?
The most important leverage is emissions that you impose on others without them having control over it. You can configure your streaming software to load lower resolution videos. But the effect would be far greater if our streaming software did this for us. A website is no different.
A few words about you and your WordPress plugins?
I have been working with WordPress since before Post Types existed. I published my first plugina little over a decade ago. Since 2013, I've been working with a small remote team and building WordPress plugins full time. These days we mainly focus on building plugins that make websites more efficient. Or that emphasise privacy, like our latest pluginKoko Analytics at WordPress.org.