I don’t have the feeling that my blog is particularly slow, but that’s because I haven’t really started out yet. I’m very worried that it will get slow soon, especially because I will have blog posts with (optimized/compressed) 40-50 photos.
This can’t be changed, but other things can.
I already read a lot about it, went through various tutorials, but yet I feel there’s some more I could do.
First of all, my blog seems to be doing well at the moment. At least according to Webpagetest.org.
Here’s my blog, so you can try yourself.
I’m trying to figure out what all the results REALLY mean, but I don’t get all of them.
Images:
I already compressed most of my images.
CSS sprites take a loooooooooot of time and so I’ll skip this for now and work on that much later when I actually get a bit higher traffic.
To compress my images I use Photoshop (save for web) and Yahoo’s SmushIt.
Javascript:
The scripts I’m using seem to cause some problems in terms of speed as I get the following suggestions from the Webpagetest.org site:
“380.5KiB of JavaScript is parsed during initial page load. Defer
parsing JavaScript to reduce blocking of page rendering.”
I have absolutely no clue what that means. Could anybody tell me more about that?
(I know that this is not particularly related to WordPress, but it’s part of speeding it up anyways, so I hope you’re willing to help me out here)
Another warning concerning Javascript:
The following external resources have small response bodies. Inlining the response in HTML can reduce blocking of page rendering. http://zoomingjapan.com/travel/mount-koya-travel-report/ should inline the following small resources: http://zoomingjapan.com/wp-content/plugins/gravatar-box/gravbox.js?ver=1.0 http://zoomingjapan.com/wp-content/plugins/jetpack/modules/wpgroho.js?ver=3.2.1 http://zoomingjapan.com/wp-content/themes/alltuts/js/contact-form.js?ver=3.2.1 http://zoomingjapan.com/wp-content/themes/alltuts/js/my-slider.js?ver=3.2.1 http://zoomingjapan.com/wp-content/themes/alltuts/js/scrollable.js?ver=3.2.1 http://zoomingjapan.com/wp-content/themes/alltuts/js/sliding_tabs.js?ver=3.2.1 http://zoomingjapan.com/wp-content/themes/alltuts/js/sprinkle.js?ver=3.2.1 http://zoomingjapan.com/wp-content/themes/alltuts/js/tab-renamer.js?ver=3.2.1 http://zoomingjapan.com/wp-content/themes/alltuts/js/welcome_back.js?ver=3.2.1 http://zoomingjapan.com/wp-includes/js/l10n.js?ver=20101110
So, it was recommended not to have any script calls in your template files, I put ALL of it in a js folder in my theme instead and that’s what you get. Thousands of tiny scripts. Of course I’m using wp_enqueue_script
!
Does that mean it’s better to put it back into my header.php? Or create a custom.js and throw in all the code that possibly can work together well?!
Or put all the Javascript in the footer.php?!
I just don’t understand what would be the best environment for WP here!
Redirects:
Remove the following redirect chain if possible:
http://0.gravatar.com/avatar/2b7d7f6b4622da443cc8081ca78db661... http://zoomingjapan.com/wp-content/themes/alltuts/images/usericon.png?s=30
Remove the following redirect chain if possible:
http://1.gravatar.com/avatar/35991606c4e61d2d3a4ba61a9e03ab79... http://zoomingjapan.com/wp-content/themes/alltuts/images/usericon.png?s=30
Remove the following redirect chain if possible:
http://www.zoomingjapan.com/wp-content/themes/proton-child/images/toplight.png http://zoomingjapan.com/wp-content/themes/proton-child/images/toplight.png
This is coming from the following code in my function.php:
add_filter( 'avatar_defaults', 'newgravatar' );
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') . '/images/usericon.png';
$avatar_defaults[$myavatar] = "ZoomingJapan";
return $avatar_defaults;
}
Can I get rid of the redirect, but keeping the function alive?
Other steps:
-
Disable revisions (done)
-
Empty trash every 2 days (done)
-
Optimize dabatase once a week (not yet)
-
Use a cache plugin (done: W3 Total Cache)
-
Flush early (not yet:
<?php flush(); ?>
not sure if that’s a good
idea to use??!) -
Use CloudFlare as CDN (not yet: what do you think about that? does it work well with WP?)
Do you have any other suggestions that are relatively easy to implement?
I know, quite a lot of questions, but if you can give me just a little suggestion for any of the points, I’d be really grateful.
Thanks a lot in advance.