Performance Issue with ‘smush_check_for_conflicts’ cron job
-
Hi,
I noticed that there was a cron job running very often on my site, and it turned out to be coming from this plugin.
There is a cron job that runs and checks if there are any plugins installed that are not compatable with Smushit, the function that checks this is called check_for_conflicts_cron (located here: /wp-smushit/app/class-admin.php)
The function is scheduled to run in the show_plugin_conflict_notice function (located in the same file). At the moment, every time the wordpress admin page loads, this job gets scheduled.
The issue is that the check_for_conflicts_cron function is not loaded during cron requests, so the ‘check_for_conflicts_cron’ action never runs,
(and therefore, it never sets the ‘wp-smush-conflict_check’ transient to tell it not to run again)
What might fix the problem would be changing the condition (in /wp-smushit/wp-smush.php)
From this:
if ( is_admin() ) { $this->admin = new Smush\App\Admin($this->library()); }
to this:
if ( is_admin() || wp_doing_cron() ) { $this->admin = new Smush\App\Admin($this->library()); }
But I haven’t tried or tested that, just adding the sample code to highlight what the problem is.
- The topic ‘Performance Issue with ‘smush_check_for_conflicts’ cron job’ is closed to new replies.