query-monitor
query-monitor copied to clipboard
Enable panels to be disabled
Since its inception, QM has been a (mostly) zero-config plugin. This is out of idealism more than practicality.
It's time to introduce the ability for panels in QM to be toggled on and off by users. A notable use case is the Capability Checks panel which, while highly valuable in certain situations, is not particularly valuable to most users most of the time. It collects a large amount of data and can cause memory issues.
The easiest way to do this is to introduce a settings screen with a checkbox for each panel that works as an opt-out system, but I'd also like to see if these checkboxes can be added to the admin toolbar menu itself instead.
Rough mockup:

Hey John! I've been playing around with this idea for some time, it started as an attempt to control access to QM by user role (also user login, but that's a different story), then it got me thinking about QM's settings in general. Here's the quick mockup I did then:

Also, I was thinking about adding 2 icon controls to each section, top right corner (not pictured on the mockup yet):
- collapse/expand panel toggle
- close/disable panel
IMO, dedicated settings page in the WordPress admin isn't worth it – QM is already available on every page once activated.
Yeah I'm also not a fan of the idea of a dedicated settings page, hence playing around with the idea of checkboxes in the admin menu. It's too intrusive though.
I like the idea of a settings panel which can be toggled. The Authentication panel has always felt a bit out of place, and it would fit well under a settings panel.
The Authentication panel has always felt a bit out of place, and it would fit well under a settings panel.
Yup, this particular panel was the first one I wanted to put inside a collapsible area.
Also, note that some checkboxes are disabled, I was thinking about leaving some core panels "always on", like general performance stats.
It would also be great to specify a default configuration other than "show everything". For example, all query related sections could be disabled by default on a site.
Probably also with something that can be defined with a constant or a variable to set on wp-config.php can be interesting.
Example: I have to debug remotely a server (putting the plugin on mu-plugins folder) but I don't want to alter the database, so if I have something that I can define by a file will be simplify a lot.
I would like to emphasize that more and more of us are using tablets and phones to admin our sites while away from our desk. Paying attention to responsive themes and the intrusive layout QM output produces would be great. It is annoying to have QM push toolbar options onto a second line, always. I'd like to option to display "QM" as the toolbar menu option displayed, and then choices in the drop down. I don't like settings checkbox in the toolbar menu but I do like the idea of settings and checkboxes. I got it, a checkbox to show checkboxes in the toolbar drop down! LoL. Sorry about my crappy humor.
I love QM. It helps me so much the last two years. Kudos!
Probably also with something that can be defined with a constant or a variable to set on wp-config.php can be interesting.
My production site could use some kind of a capabilities based panel enabling algorithm.
-
Regular admins see a very restricted set of panels (render time, warnings/errors) - most of regular admins don't pay any attention, so no need to collect all this data and slow down the page render, but it'd be great to have specific numbers available when any warnings light up.
-
Developers see expanded set (restricted set, queries, environment, etc)
-
Developers should be able to also easily opt-in into heavy duty stuff for temporary debugging sprints (hooks, languages, etc)
This is definitely something I'm planning on adding. Need to find some time to work on it.
but I don't want to alter the database, so if I have something that I can define by a file will be simplify a lot.
I like how Advanced Custom Fields handles field group exports, and I think it could be used here. A JSON or PHP file can be exported, and ACF will pull the field group settings from that.
Something like that for QM would be 🌟 🌟
Just found this article re JSON for configs: https://arp242.net/weblog/json_as_configuration_files-_please_dont