• Resolved mayur1234

    (@mayur1234)


    Hi,

    Site Kit use high execution time on my website I found some result by code profiler.

    Script Performance: Time 0.068361 sec
    Methods & Performance: 0.068031 sec
    database query performance: 0.000522 sec

    Methods and performance

    scripts performance

    I attach some screenshot pleasee help me about code how can I change that code to prevent this problem how to apply foo class on code to optimize.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Hi there @mayur1234,

    Thanks for opening a support topic, and sharing details of your analysis. Site Kit doesn’t result in any scripts executing on the front end of users site other the service specific scripts if a user decides to active them, for example Google Analytics or AdSense. The scripts that will be executed if these modules are activated within Site Kit, are the same scripts that are executed if a user manually adds these services, without using Site Kit. They are not Site Kit specific. We have more information on the code snippets and the front end aspects of Site Kit added to the plugin website:
    https://sitekit.withgoogle.com/documentation/using-site-kit/front-end/

    With regards database performance Site Kit uses the various Google API’s to display information within the Site Kit dashboard, rather than pulling information from a users connected database. There are some standard WordPress tables that Site Kit does use, such as wp_options. Looking at the results you kindly provided these don’t seem to have a negative impact.

    With regards the methods and performance analysis I’ll have to check this with the team. I suspect these are only applicate for you you as a logged in administrator, using the wp-admin dashboard. I’ll report back to you here on this.

    In relation changing the code you’ll find the plugins GitHub repository below, where you can submit any proposed changes or even fork your own version and make any changes you wish. When it comes to programmatic changes it’s not something we can advise here within the plugin support forums.
    https://github.com/google/site-kit-wp

    I’ll report back to you here after I query your methods and performance analysis with the team. Thank you!

    Thread Starter mayur1234

    (@mayur1234)

    Hi,

    Thanks for your reply. I will wait for your solution about method and functions performance.

    In backend site also have same problem

    script performance: time 0.028315 sec
    Method and functions performance: time 0.027956 sec

    Method and functions performance

    Plugin Support James Osborne

    (@jamesosborne)

    Hi @mayur1234,

    I’ve spoken with the team and I can confirm that WordPress coding standards and other best practices are already applied in the development of the plugin. They also reviewed the statistics you provided, with the Methods & Performance category account for 0.068 of a second.

    If you find anything in particular through the codebase which you feel warrants a review you can submit feedback on the plugins GitHub repository.

    Thread Starter mayur1234

    (@mayur1234)

    Ok James Thanks for the update

    Plugin Support James Osborne

    (@jamesosborne)

    No problem, happy to assist. Best of luck with your site.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How I optimize Site Kit scripts, Method & Function performance’ is closed to new replies.