[Support request] Slow Site Speed Related To WP Head Hook?

Home Forums Support [Support request] Slow Site Speed Related To WP Head Hook?

Home Forums Support Slow Site Speed Related To WP Head Hook?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1559756
    Michael

    Hi, my site is suffering from some poor load times and I have been trying to resolve with Host.

    They say the speed problem is related to the theme. However when I first launched the site is was very fast.

    I may a little direction of how to fix the issue they have pointed out. Below is a cut and paste from tech support.

    Thank you for your reply.

    I will be unable to confirm whether it will improve the performance of your website.

    The reason is that there are many factors which may be causing the issue. Cloudflare is recommended if the visitors of the website are based in different countries around the world. It will cache the content of the website and spread it to different servers globally.

    I have performed a few additional test and as per the WP Profile interface the issue is related to the Theme of the website. More specifically the wp_head hook.

    mich5663@sgp4 [~/public_html]# wp profile stage
    +————+———-+————+————-+————-+————+————–+———–+————+————–+—————+
    | stage | time | query_time | query_count | cache_ratio | cache_hits | cache_misses | hook_time | hook_count | request_time | request_count |
    +————+———-+————+————-+————-+————+————–+———–+————+————–+—————+
    | bootstrap | 1.0153s | 0.0221s | 51 | 97.79% | 3281 | 74 | 0.5432s | 60037 | 0s | 0 |
    | main_query | 0.0301s | 0.0224s | 9 | 96.84% | 306 | 10 | 0.0283s | 768 | 0s | 0 |
    | template | 10.488s | 0.0773s | 86 | 97.76% | 4802 | 110 | 10.4852s | 11274 | 10.1548s | 7 |
    +————+———-+————+————-+————-+————+————–+———–+————+————–+—————+
    | total (3) | 11.5335s | 0.1218s | 146 | 97.46% | 8389 | 194 | 11.0567s | 72079 | 10.1548s | 7 |
    +————+———-+————+————-+————-+————+————–+———–+————+————–+—————+
    mich5663@sgp4 [~/public_html]# wp profile stage template –spotlight
    +———–+—————-+———-+————+————-+————-+————+————–+————–+—————+
    | hook | callback_count | time | query_time | query_count | cache_ratio | cache_hits | cache_misses | request_time | request_count |
    +———–+—————-+———-+————+————-+————-+————+————–+————–+—————+
    | wp_head | 31 | 10.0378s | 0.0872s | 72 | 95.46% | 1998 | 95 | 9.7619s | 7 |
    | wp_footer | 11 | 0.0118s | 0.0002s | 1 | 100% | 612 | 0 | 0s | 0 |
    +———–+—————-+———-+————+————-+————-+————+————–+————–+—————+
    | total (2) | 42 | 10.0496s | 0.0873s | 73 | 97.73% | 2610 | 95 | 9.7619s | 7 |
    +———–+—————-+———-+————+————-+————-+————+————–+————–+—————+

    Note that only values of 0.0xxx fall into the acceptable range.

    This hook allows WordPress, themes, and plugins to add HTML wherever it is placed.

    I would recommend you to discuss the case with the Theme developers or professional web developer who can help on the matter.

    Thanks in advance.

    #1559780
    Elvin
    Staff
    Customer Support

    Hi,

    Can you link us to the site in question? So we could run it through page speed test sites to see the reports.

    wp_head hook by itself doesn’t exactly slow down the site. It’s the number of scripts & styles being hooked in it that’s causing potential slowdowns.

    By default, the theme barely adds scripts/styles that’s too heavy on wp_head/<head> tag to cause any significant slowdowns.

    Also, These scripts/styles that can cause potential slowdowns can come from badly written plugins too.

    That said, try reducing the number of plugins you use.

    Alternatively, consider using optimization plugins and configure it properly so there’s fewer things to load within the <head> tag, making the site load faster.

    #1559786
    Michael

    Thanks.

    The Website is service8.com.au

    #1559800
    Elvin
    Staff
    Customer Support

    Thank you. 🙂

    Check this report of your site from Google PSI:
    https://developers.google.com/speed/pagespeed/insights/?url=service8.com.au&tab=desktop

    There are 2 main offenders:

    As for “Eliminate render-blocking resources”

    You can read Google’s recommendation here:
    https://web.dev/time-to-first-byte/?utm_source=lighthouse&utm_medium=unknown

    To put this simply, you can use optimization plugins(ex: WP Rocket, Autoptimize, W3 Total Cache, etc) and configure them to address this issue.

    As for “Reduce initial server response time”

    You can read Google’s recommendation here:
    https://web.dev/time-to-first-byte/?utm_source=lighthouse&utm_medium=unknown

    This is addressed on the server site of things. You’ll have to ask your host to address this particular issue.

    #1559828
    Michael

    Thanks Elvin,

    I was using auto optimise and the site was slower. I tried W3 Total Cache and it has improved the speed test by a significant amount.

    Not sure how seriously I am to take these test? How accurate are they?

    Thanks for your help.

    #1559848
    Elvin
    Staff
    Customer Support

    Not sure how seriously I am to take these test? How accurate are they?

    These tests are taken with a grain of salt. The reports are not the “end-all-be-all” of things but it gives useful hints on which things need to be worked on.

    You can do tests on multiple page test sites to get different “opinions”/reports on things.

    We normally use GTMetrix, Google PageSpeed Insight and webpagetest.org to have multiple things to base things on.

    Here’s a performance report on your site from webpagetest.org:
    https://webpagetest.org/performance_optimization.php?test=201201_DiTG_9fba43ee49dc7f70084af8cda5cdcd54&run=1#first_byte_time

    First byte time is basically Reduce initial server response time(TTFB).

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.