Archived topic
Why my site has no URLs with a good page experience
27 replies · Started by Kris on October 28, 2021
1. Best way to resolve that is check with the host about enabling page caching.
2. Don't worry about that, we can clear that by adding a display=swap property to the font but this can cause CLS issues.
3. Lets improve image loading.
a) As you have a lazy load plugin we can remove that Diagnostic by disabling the native WP lazyloading with this PHP Snippet:
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
b) Your featured image is above the fold, so you don't want it to lazy load. To fix that add this snippet:
function skip_lazy_first_featured_img_date_no_lazy($attr) {
global $wp_query;
if ( 0 == $wp_query->current_post ) {
$attr['data-no-lazy'] = '1';
}
return $attr;
}
add_filter('wp_get_attachment_image_attributes', 'skip_lazy_first_featured_img_date_no_lazy' );
Thanks David! I will work on those, mate.
What about the Minify problem? Anything we can do there?
I would make the changes i proposed above.
We can revisit minification if necessary afterwards :)
Hi David,
I added those 2 snippets you adviced. We are still a bit under 90 at PSI.
What do you think about this plugin https://wordpress.org/plugins/debloat/
Could that do the minify trick perhaps?
Cheers,
Kris
Well thats an improvement :)
Personally i try to avoid plugins that try to 'auto magically' trim back resources as they may work great for simple pages but more complicated layouts can lead to things breaking.
Better to eliminate whats resources are creating the largest delays.
Looking at the PSI Reports the Social Sharing plugin is quite heavy - it loads two CSS files that are around 80kb in total size. And very little of that CSS is being used. Might be worth switching plugins.
Although it hasn't been updated, i see a lot of users try this one:
https://wordpress.org/plugins/shared-counts/
Or there is the paid for NovaShare plugin - which i have used and its really is super lightweight.
Hi David,
I changed the social plugin, and getting some 90 scores on some articles now!
This one has been the worst performer according to PSI
https://socialmediarevolver.com/how-to-choose-the-right-tiktok-hashtags-to-go-viral-in-2021/
I have managed to reduce and optimise the images, but still I can't break 90. The same with the homepage.
Cheers,
Kris
In Customizer > General - switch the Icon Type to SVG. It will at least remove the Ensure text remains visible during webfont load on that page.
Odd one - the theme is still loading Font Awesome, which it hasn't done for at least 4 years.
Do you have any Functions ( PHP Snippets ) related to the fontaweseome ?
Hi David,
I have now switched the Icon Type to SVG.
Re. Snippets this is what we have https://socialmediarevolver.com/wp-content/uploads/2021/11/snippets.jpg
Not sure what that Read More is! Perhaps we could disable it?
Cheers,
Kris
Nope none of them functions.
Which version of GP Premium are you running ?
And do you have any Page Caching on the server ? IF so could that be flushed?
Hi David,
Ijust received this message from WordFence:
Critical Problems:
* The Plugin "Code Snippets" has been removed from wordpress.org. Plugin contains an unpatched security vulnerability.
Is there another plugin that I can use instead, mate?
Cheers,
Kris
Oh wasn't expecting that - I checked out the Code Snippets Facebook group and found they posted this message:
Hello, some you you may have noticed we’re temporarily not available in the WP repo. No worries, it’s a false positive. Things will be fixed soon. A word from our Chief Code Crusher:
> Hello! This isn't something to be super concerned about. The WordPress.org Plugins Team have been in contact about what they believe is a potential XSS issue, which may actually be a false positive. Either way, it should not take too long to sort out and the plugin should be back up soon. We're not going anywhere!
If you want to change, then the only recommendation I can give is to use a Child Theme as I haven't used any of the other Snippets plugins that are available on Wordpress.org
OK, I feel much better now :)
Thanks David!
Cheers,
Kris
The Code Snippets plugin has returned to WordPress.org :)
Glad to be of help