WP Sustainability Plugin - Must Haves & Nice to Haves #25
Replies: 20 comments 15 replies
-
My suggestions: Must haves:
Earlier talks learned me that in order to become a plugin with final goal to become part of the WordPress Core one day, the plugin should not interact with any external APIs or services. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback James. My reflexion would be, do we aim to create a model to calculate CO2 emissions? or are we confortable using an Open Source project that is well maintained? For example, CO2.js library it's used but the most popular website carbon calculators (Ecograder, Website Carbon Calculator, Ecoping...). So that could be a good starting point as standard, don't you think? |
Beta Was this translation helpful? Give feedback.
-
Great suggestions @Nahuai and @JamesDominy. |
Beta Was this translation helpful? Give feedback.
-
+1 for CO2.js |
Beta Was this translation helpful? Give feedback.
-
Also leaving here the comment I left on Slack, so we can have it all the info here:
|
Beta Was this translation helpful? Give feedback.
-
Let me summarize the options mentioned here above and during WP Sustainability slack meetings have for measuring site weight/emission:
This overview may not be complete, please feel free to add tools to make the overview more complete. |
Beta Was this translation helpful? Give feedback.
-
I have had a chat with @janhenckens about the plugin Statik has released for Craft CMS. Besides being a bit dreamy about what kind of impact WP could have surfacing carbon footprint data in the admin, I'd like to sum up some more practical things:
Then for the dreamy part: ;-)
|
Beta Was this translation helpful? Give feedback.
-
Have we discussed or thought about adding it to the Site Health component instead of a plugin? A beta/feature plugin first might be a good way to start though, which we can eventually bring into the Site Health component. |
Beta Was this translation helpful? Give feedback.
-
Another idea to add is around fonts, that may or may not become part of core. Preferably it would. :-) The Font Library is a great new feature in WP 6.5. There are some opportunities there though.
Another idea to add concerning the Font Library is that it could suggest to use the |
Beta Was this translation helpful? Give feedback.
-
I'd love to see some more inline advice (for example on the media upload page) on image formats to use. I realise that it is not obvious, since there are so many ways to upload an image in WP. Since images make up a large part of the assets, there is a lot of low hanging fruit there, worth looking at it. |
Beta Was this translation helpful? Give feedback.
-
Let’s also mention here that we’d really need to give actionable advice and thus trustworthy resources (like a handbook or at least some pages) about what one can do to improve their site (as already mentioned here by @YellowlimeNL). Especially if we surface carbon emission data. |
Beta Was this translation helpful? Give feedback.
-
If i understand it correctly, Perfume.js has the functionality to share metrics with external analytics tools. (https://youtu.be/9DZAVpAubtQ?si=YH1yCHfM_yTKFv3I&t=412). The power of that would be that in case we embed Perfume.js in the plugin, we can push metrics from websites to our own database. This data can be used for our own independent bench mark tool. It even allows us to measure changes (savings of emission) over time. |
Beta Was this translation helpful? Give feedback.
-
Almost forgot to add: deferring the loading of embedded videos! WP core takes care of lazyloading images and iframes by default. This means, however, that embedded videos (iframes , such as Youtube videos) will still load when they are (almost) in view. The problem with this is that they are accompanied by a giant amount of JavaScript (around 600 kb for Youtube) and often they won't even be viewed. Also, this can have privacy issues (depending on the cookie policy of the website) since the visitor might have never agreed loading the video. Lazy loading could be taken a step further by loading the (assets of the) video only when it is clicked. This saves a large amount of data. There are some plugins available doing this. The one I use is Lazy Embed by Beleaf, which has no settings and simply defers the loading of embedded videos until clicked. There are other ones, such as Embed Privacy, which is more complex and more privacy focused. This feature is also performance related. I believe that this is something that could be a core feature for a privacy-friendly software like WP. |
Beta Was this translation helpful? Give feedback.
-
If you'd like to see this demonstrated IRL, I've made a small analysis on this approach in this blog post: https://oldrup.dk/en/more-speed-less-tracking-with-embed-privacy/ _Embed Privacy helped reduce carbon emissions by 92% According to Beacon the CO2 emissions per view of this very page are:
This is, of course, true only as long as the videos are left unplayed._ Another thing I appreciate by Embed Privacy, is that it supports, if not all, then most of the embeds available in the block editor, including WordPress TV, Spotify, TikTok and so on. Out of scope of a WP Sustainabilty Plugin; the embed "placeholder" can be styled to match the colours and size of the actual embed, avoiding layout shifts, and providing in my opinion, a pretty elegant solution. Screenshots from an article in production, where I embed Spotify content: |
Beta Was this translation helpful? Give feedback.
-
We can have the best of both worlds :) By default, the placeholder loads no external assets at all, nor does it set any cookies. You'll have to click each individual placeholder to load the embed, that holds true after a page reload. (Embed A en screenshot below) Unless, you click the "Always display embed" checkbox (Embed B in screenshot), in case a flag is stored (Local storage, I think), and the embed from this provider will always load on page load. This flag can be reset by the user. Embed Privacy is really very flexible. You can extend it to your heart's content. Each embed type, is really just a title, a link to a privacy policy, and a regex pattern to target the embed. Works with popular multi-language plugins like PolyLang too. |
Beta Was this translation helpful? Give feedback.
-
I’d like to add craw optimisation here as well. In short: when bots crawl a website (which they do too often), they follow all the links (except 'nofollow's if they are nice), but websites happen to have too many, too irrelevant links in their headers, for example. There is a great talk about this by Joost de Valk. This is not so much a performance related thing either, but can be some low-hanging fruit with a huge impact. There are plugins doing this, even Yoast SEO added a lot of default settings to minimise the number of links present. What do you think? |
Beta Was this translation helpful? Give feedback.
-
Summary of thread so far 2024-05-20This is now a fairly long running thread, and there are have been many ideas and suggestions. I thought it would be useful to summarise the contents and hopefully focus the discussion again so we can make some decisions/progress. Obviously if I've missed something, or got something wrong, please feel free to @ me in the discussion, and I'll correct. Also, @YellowlimeNL, could you please copy this up into the discussion topic block. We could keep it up to date there then. Proposed Requirements
Decisions MadeNone so far Open questions
|
Beta Was this translation helpful? Give feedback.
-
Great overview, Thank you so much for putting this together @JamesDominy. This piece will be helpful and can be optimized further during WCEU's ContributorDay! |
Beta Was this translation helpful? Give feedback.
-
Don’t know if it’s should be in this plugin but it would be nice to know if the plugins that are installed are substantially friendly and one way is to check the hosting they using are green. Just for fun I let the ChatGPT make a POC Wordpress plugin that checks if the plugins I use, have a green hosting . From the Plugin URI: (not Author URI) against GreenWeb check API and the results are in the screenshot for my page for inspiration. |
Beta Was this translation helpful? Give feedback.
-
A short summary of the things we talked about during Yoast’s contributor day on October 17:
|
Beta Was this translation helpful? Give feedback.
-
Assume the WordPress Sustainability Team develops its own WordPress Plugin what are the requirements or in other words ‘Must Haves’ & ‘Nice to Haves’.
For your reference
Work in progress, feel free to complete the list! 🙂
Beta Was this translation helpful? Give feedback.
All reactions