• Upon activation of Query Monitor, noticed a couple of slow queries all over the back-end coming from this plugin. The fix that worked for me is to limit calls of those queries only when using the plugin.

    plugins\delete-thumbnails\delete-thumbnails.php line 16:

    Change this:

    function dlthumbs() {
    	global $dlthumbs;
    	if (is_admin()) // admin only
    		$dlthumbs = new dlthumbs();
    }

    To this:

    function dlthumbs() {
    	global $dlthumbs, $pagenow;
    	//ensure slow db calls aren't called everywhere in back-end 
    	if ( is_admin() && $pagenow == 'tools.php' && isset( $_GET['page'] ) && $_GET['page'] == 'dlthumbs' ) {
    		$dlthumbs = new dlthumbs();
    	}
    }
Viewing 1 replies (of 1 total)
  • Plugin Author David Sword

    (@davidsword)

    Hello!

    Thank you very much for finding this and bringing this up with a solution.

    This plugin was thrown together quickly to do a job. Embarrassingly, this plugin is terribly out of date and in major need of of some attention for security and preformance. I would love improve it, and it’s on my list, but I don’t know when I’ll have time.

    Thank you again!

Viewing 1 replies (of 1 total)
  • The topic ‘Slow SQL queries’ is closed to new replies.