[wp-hackers] Plugin queries executed even when plugin is not being called?

Derek Hogue derek at amphibian.info
Tue Jan 20 18:27:18 GMT 2009

Hey all - is this expected behaviour, or have I coded this incorrectly  

My plugin makes its own queries (to its own DB tables) through $wpdb.   
These queries are all within functions in my plugin files, and these  
functions are called via either template tags, my plugin's widget or  
my plugin's shortcodes.

However, as soon as my plugin is activated, WP's queries shoot up on  
every single page load, as though every query within every function in  
the plugin is being executed regardless of whether you're on a page  
that actually calls any of these functions, or whether you even have  
called these functions anywhere in your theme.

Any ideas as to why this might be?  Needless to say, my users are a  
little miffed at this.


More information about the wp-hackers mailing list