Envato Setup Plugin > set_time_limit(600);

Hello, this is for Envato developers (hopefully this reaches them as there is no email address to contact!).

Envato Setup plugin includes a crappy piece of code that overrides the server maximum_execution_time for php…

Code is found from /envato_setup/envato_setup.php > Lime 37 > // Increase the max execution time for crappy hosts.
set_time_limit(600);

This needs to be removed as it causes problems for whole WP installation.

Hi @wibizsolutions,

Can you provide more detail about which plugin you’re referring to? I’m not familiar with the “Envato Setup plugin”. A link to where you got it and screenshots would be helpful to understand.

Hello, the plugin is this: https://envato.com/market-plugin/

It is bundled with majority of your themes/plugins by default, ours came together with Embark WordPress Theme and includes the malicious code that alters the php max execution time.

The only plugin I’m aware of whose directory matches “envato_setup” is this one from @dtbaker but it doesn’t contain the line you’re referring to – https://github.com/dtbaker/envato-wp-theme-setup-wizard

The plugin you linked above is the newer Envato Market plugin, which would appear as “envato_market” rather than “envato_setup”. There has never been an envato_setup.php file in that plugin, and I couldn’t find a call to set_time_limit anywhere.

Perhaps this is a custom setup plugin from the author of the theme or elsewhere? I doubt any official plugin would have a comment about “crappy hosts” hiding in it.

@rosssimpson will definitely be more capable of tracking this down than me, but I’ve looked heavily at both of these plugins over the years, so I just wanted to chime in. :slight_smile:

It is within Embark theme folder …\wp-content\themes\embark\plugins\envato_setup\envato_setup.php

Theme URL: https://themeforest.net/item/embark-wordpress-theme-for-tour-companies/20216095

I wonder why would theme author need to modify the Envato plugin, for fun?

Hi there @wibizsolutions

Yes as @baileyherbert mentioned there is some old code https://github.com/dtbaker/envato-wp-theme-setup-wizard that has been copied/modified/used by authors and included in quite a few WordPress Themes. This is not an official Envato piece of code and it does not contain any set_time_limit by default.

Please reach out to the author of the Embark WordPress theme letting them know about this issue and asking for them to remove the line of code from their WordPress theme.

I am curios though, what sort of issue does set_time_limit(600); cause on the hosting account? That sets a 10 minute execution time limit which is very generous and I don’t know of any WordPress scripts that would take that long to execute.

Some hosting providers actually block access to calling set_time_limit() - is that the issue you are seeing? The code fails to execute all together?

Best of luck resolving the issue with the authors.

Dave

2 Likes

Ok, will notify the plugin devs then.

Re:execution time, this is something plugins should never override, I think we can all agree on that. Problems comes when we run long backup sessions or static exports of our sites where 10 minutes is not sufficient time. It took a while to find this snippet of code to troubleshoot the issue as normally plugins do not alter the server config… For a good reason that is.

1 Like

Thanks for letting us know. We are the developers of the Embark theme and we will adjust that code to be more user friendly. We will consider removing it all together. :slight_smile: Thanks.