• Hello,

    I was checking the website today on GT Metrix and on the waterfall feature, I found that under the “Post” section, that it was taking around 500 ms to load. Upon further investigation I found this code that was causing the issue action=tptn_tracker&top_ten_id=261&top_ten_blog_id=1&activate_counter=11&top_ten_debug=1

    Is this the top 10 tracker? Is there anyway you can reduce the load that this is causing? or are there any settings that I can toggle with to reduce/eliminate this issue?

    Warm regards

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Ajay

    (@ajay)

    You could try this on your site: https://github.com/WebberZone/top-10-fast-tracker

    It uses a shortinit and a manual hunt for wp-load.php which speeds up the tracker. Once you activate this you can goto the Top 10 settings page and select Fast tracker.

    I recommend signing up for notifications for updates as I don’t yet have an automated update system in place yet.

    Thread Starter hbk747

    (@hbk747)

    @ajay

    I tried this on my staging and it seemed to be working but on GT Metrix, the fast tracker is in red and has a 403 status while the rest of the elements have a 200 status and are not in red.

    I do not think this could be because of the CSP (content security policy) since there is no third party url involved.

    Here is a screenshot. https://ibb.co/YL2JJwN
    If you want to run a test, this is my staging https://wordpress-601622-2730607.cloudwaysapps.com/

    Plugin Author Ajay

    (@ajay)

    @hbk747

    Does it work if you just browse on your site. I mean do the counts update?

    I think there is something blocking the script probably because it’s directly in a wp-content folder.

    E.g. if you see this on a site running it you’ll note a response similar to what you’d have with the other trackers – but faster

    https://gtmetrix.com/reports/techtites.com/k8jgPYKF/

    Thread Starter hbk747

    (@hbk747)

    @ajay

    I tried visiting a bunch of pages on the staging site and went to the top 10 page to see if it showed any articles under “Today”. Its empty there. If I click yesterday and other tabs, i see posts but not on Today. Is there any other way to check or was this fine?

    GT Metrix still shows it as 403

    The only thing I did different was the way you asked to install the fast tracker. I just uploaded it from the WP dashboard Plugins > Add New, rather than using FileZilla and doing it manually. I activated the plugin then and turned the fast tracker setting on from the top 10 settings.

    If you want access to my staging, let me know. We aren’t allowed to share credentials here so I can email them to you.

    Warm regards

    Plugin Author Ajay

    (@ajay)

    Something is blocking that script from running. Which could just be a hosting issue completely independent of GT Metrix. You’re right not he manual install – it works well that way and I use the same method.

    Do you know if Cloudways blocks direct access to scripts from the wp-content/plugins folder?
    Can you check with them? Maybe a whitelist is needed to allow that script to run.

    Thread Starter hbk747

    (@hbk747)

    @ajay

    you were right.

    CLoudways said that they had to enable direct php access. It does not seem blocked anymore. I am going to check if the counter is working and will let you know.

    Thanks!

    Plugin Author Ajay

    (@ajay)

    @hbk747

    Were you able to see an improvement?

    Thread Starter hbk747

    (@hbk747)

    @ajay

    Hello.

    Its a bit weird because sometimes I see a major improvement while other times it is more or less the same. I just ran a gt metrix test and got an overall B but on the waterfall, the fast tracker is taking time. Kindly check the ss below:

    https://ibb.co/pLXVC5N

    Plugin Author Ajay

    (@ajay)

    That is higher than it should.

    Could this be an issue of it being a staging vs a live site?

    I just ran GTMetrix on a post on your site and it was much smaller. c.220ms – which I’d expect to be the case.

    Thread Starter hbk747

    (@hbk747)

    The tests that I am doing right now are all on the live site. I am conducting them on the homepage however.

    Recently I changed my cdn to cloudflare but I dont think that should have anything to do with it. It has been almost a week when I did that so the propagation should be complete as well.

    Any ideas?

    Plugin Author Ajay

    (@ajay)

    I’m afraid not. Are you noticing any major issues on page load? This runs as an ajax script in the background and shouldn’t affect page loads for visitors.

    Thread Starter hbk747

    (@hbk747)

    I switched to cloudflare recently and since then my cloudways server is responding a bit slower. The TTFB is a bit high. The GT metrix score is between a B or a C.

    Check out this report
    https://gtmetrix.com/reports/www.paradigmshift.com.pk/3fchTV76/

    You can click on waterfall and see that admin ajax is high. Cloudways said it might be due to heartbeat but I have wp rocket and have reduced heartbeat. I told them that the heartbeat has been reduced since a while and I never received this slow initial server response. I am waiting for their reply. In the same link, you can see that the fast tracker was 1.4 seconds. Not sure what is going on.

    Also if you need access to my staging website if you are curious as why this is happening, I can email you the credentials.

    Will let you know if cloudways or I manage to find a fix.

    Warm regards

    Thread Starter hbk747

    (@hbk747)

    Could it be an autotimize issue?

    I remember you asked me to add these two in the javascript exclusion list: top-10-tracker.min.js, top-10-tracker.js

    Is there any need to add an exclusion for the fast tracker or no?

    Plugin Author Ajay

    (@ajay)

    I don’t think it would make a difference as the tracker is a PHP script called separately as an Ajax call.

    Can you remind me what this purple bar is part of the timeline i.e. the largest part of the request?

    One thing to try is to edit the PHP script and delete this line which echoes the output.

    https://github.com/WebberZone/top-10-fast-tracker/blob/master/includes/fast-tracker.js.php#L61

    You can also replace it with:

    		header( 'HTTP/1.0 204 No Content' );
    		header( 'Cache-Control: max-age=15, s-maxage=0' );
    

    https://github.com/WebberZone/top-10/blob/master/includes/tracker.php#L217

    Thread Starter hbk747

    (@hbk747)

    I tried both and it improved the time significantly. Deleting the echo got me a 218 ms time for the fast tracker and the top10 tracker showed 259 ms (later it showed 181 ms).

    Replacing it with the header lines got a 220 ms and then 216 ms for the fast tracker. The top10 tracker showed a 242 ms.

    My question is does this seem normal now for both fast tracker and top10 tracker or is it supposed to be more optimized than this? The gt metrix report you shared of that website above is not working anymore so I cannot compare.

    Secondly if you think this is the best time we can get, what should I go with? Deleting the echo or replacing it with the headers? Or it does it not matter?

    You can check the report for the staging website here (echo line deleted):
    https://gtmetrix.com/reports/wordpress-601622-2730607.cloudwaysapps.com/BUKGeMC6/

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘GT Metrix issue’ is closed to new replies.