Support » Plugin: Query Monitor » Query Monitor Identifying Wrong Culprit Plugin

  • Hello,

    We encountered a message from Query Monitor indicating that WPML was running several hundred queries that loaded all the options for all sites on a WP 9.9.9 multisite network on every page load rather than loading only the options for the individual site it was active on in a multisite network.

    When reported to WPML, they responded:

    “This news is surprising/unexpected and our senior supporters would like more information on the query used to make this observation/claim.

    Normally, it does not sound like something WPML would/should do as each site is independent and does not need options from any other site. As you can see here query loads data from current option site option table only.

    If you can provide a screenshot of the queries that would be very helpful.”

    We had our developer dig a bit deeper and found that:

    “…while it’s reported by Query Monitor as the sitepress-multilingual-cms being responsible (see attached screenshot); following it back the actual culprit which is the WPMUDEV’s Ultimate Branding plugin’s maintenance feature.

    From looking at the ub_maintenance class, it’s instantiated so it can see if it’s enabled or not, but doing this requires it to load its options triggering the unnecessary call to ub_maintenance::get_sites() to populate the settings page section “Sites”. When I commented the $options[‘sites’] array out the calls were no longer made on the frontend, but that part of the settings disappeared as expected. It seems like wrapping this array with a condition that checks it is on the maintenance settings page would solve the original issue in the Ultimate Branding plugin.”

    So Query Monitor has helped us find a problem, but it did so by identifying the wrong culprit. I just wanted you to know in the event an update might be able to improve the accuracy of Query Monitor reports even more.

    Phil Duncan

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Query Monitor Identifying Wrong Culprit Plugin’ is closed to new replies.