Hi,
I run a nursing exam prep site on LearnDash for a client. Since spring the quiz pages felt slow. Query Monitor showed nothing strange, 40 queries,under 100 ms in the database. The time went somewhere else.
So I wrote an mu-plugin. 40 lines. It hooks into 'all' and takes microtime at the start and at the end of every hook. Anything over 50 ms goes into wp-content/slow-hooks.log with the hook name, the callback and the URL.
Ran it for one day. Log file was 3 MB. Most of it was one callback. A quiz add-on from the LearnDash marketplace was doing a wp_remote_get to its licence server on init. On every page load. Not cached, 400 to 900 ms each time.
Disabled the licence check with a filter and the quiz pages went from 1.4 s to about 0.5 s server time.
Surprise for me: the big offenders were not where I expected. Elementor was fine. LearnDash core was fine. One cheap add-on ate everything.
What I'd still change: 'all' hook is heavy itself, maybe 5 percent overhead, so it only runs when a constant is set in wp-config. And log rotation. 3 MB per day adds up.
Thanks!