WordPress.org

Ready to get started?Download WordPress

Forums

Theme Check - execution time (10 posts)

  1. Delpierooo
    Member
    Posted 1 year ago #

    Hi.

    When I run Theme Check(http://wordpress.org/plugins/theme-check/) on my WP theme on my localhost. Where can I search for the issue? Can it be that it's just too much code and it needs more time to execute or should it execute in 30 seconds no matter how much code I have? I do have some complex files(5000+ code).

    If this could be an issue solved in theme code, please point out on what should I focus.

    Thanks!

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    What happens if you run the Theme Check on the default 2012 theme when that theme is active?

  3. Delpierooo
    Member
    Posted 1 year ago #

    Theme check gets executed in few seconds. It seems to be a problem with my theme.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    I hate to say it but it could be that there are so many issues in your theme that the plugin is struggling on your server. Try turning debug on and enabling error logging to locate & fix issues in your theme before running Theme Check.

  5. Delpierooo
    Member
    Posted 1 year ago #

    Hi again,

    I have debuged theme using wp_debug and some debug plugins. Have resolve those issues.

    Is it possible that it's too much code for 30 seconds or is theme check spending so much time with something else?

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    The plugin doesn't do anything other than check the code of your theme. Have you tried increasing the max-execution time in your server's php.ini file? That said, I've run the plugin on over 30 different themes previously and its never taken more than about 10 seconds to complete.

  7. Delpierooo
    Member
    Posted 1 year ago #

    Hi,

    but why would it take so long? What could be in the code that could cause the check to be so long? Need to get it under 30 seconds. Does it matter how complex the code is or something? Really have no idea and would need to resolve this.

    Thanks for the past answers and for the incoming ones :)

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    What could be in the code that could cause the check to be so long?

    I have no idea. Sorry.

  9. Delpierooo
    Member
    Posted 1 year ago #

    Hi again,

    thanks for your time and help anyway.

    Anyone else maybe knows what could it be?

  10. Delpierooo
    Member
    Posted 1 year ago #

    Hi again,

    I've kinf of found out that the cause are all translate lines like:
    __("Text",'domain')

    Any solution for this maybe? Do I need to add something else for this to be ok? Have this in my functions file load_theme_textdomain('domain',get_template_directory() . '/languages');

    THANKS!

Topic Closed

This topic has been closed to new replies.

About this Topic