You can create a dummy theme, with just an index with static content, and check the value of get_num_queries() there, that way you can have an idea of how many queries the core executes, and then, do the same with the theme you want to use activated.

I don't think this approach is gonna be perfect, but it could give you a good idea of the number of queries executed.

I'm gonna expand a bit on this:

You can get the queries run (including the SQL), by setting a constant in wp-config.php:

define('SAVEQUERIES', true);

With this, what you can do is create add the following function to your functions.php:

add_action('shutdown', 'number_of_queries'); function number_of_queries(){ global $wpdb; echo 'on PHP shutdown'; var_dump($wpdb->queries); }

The action shutdown executes after PHP is done executing, so if you get the queries at this point, you can get all the queries.

Also, you can call $wpdb->queries from diferent files, to see the queries ran by the time they are executed.

With the following function you get the queries ran by wordpress by the time the functions.php file is loaded.

add_action('after_setup_theme', 'number_of_queries_after_setup_theme'); function number_of_queries_after_setup_theme(){ global $wpdb; echo 'after_setup_theme'; var_dump($wpdb->queries); }

You can check the basic execution order here

The plugin debug bar is a great option too