I believe there's a lot of misunderstanding happening in this thread, which is why we've all been arguing back and forth. I know I've been arguing against the proposed idea, but I'm a fan of contextual/dynamic loading idea in general. My arguments have not been rooted in "ideology" though. I'm talking about actual, real-world use here and problems presented with the idea.
The original idea in this thread is about the loading of an entire plugin's PHP files. Styles and scripts are a different thing, but I'll get to those later.
The idea is to selectively load PHP files on specific pages. I know that many people don't understand the order hooks are fired in, so I'll try to keep this simple. WordPress fires "hooks" at certain points in the page load. The required hook here for conditional loading is
template_redirect. This is the point WordPress knows what page you're on. For example, you can start using conditional tags like
is_category(), and so on here. This hook is fired later than many other hooks in WordPress. If a plugin needs one of those earlier hooks (many do), it'd be too late in the process to load the plugin. Thus, breaking the functionality of the plugin.
And, we're just talking about the front end of the site here. I didn't even get into the admin area stuff.
I don't know how to explain it any simpler than that. It's not that I don't feel all of your pain (I use some crappy plugins too), but I'm just looking at the fact that this type of loading is impossible for all plugins.
Style and scripts
Since this was brought up, I thought I'd address it. Styles and scripts are a different beast than PHP files, albeit a much smaller beast in terms of the idea of this topic.
Assuming all plugins correctly use
wp_enqueue_script() to load their styles and scripts, I don't see any reason it wouldn't be possible to code an interface for controlling when these files are loaded. Not all plugins use this system correctly, so there's nothing you can do about those.
The only problem with this is that I don't see it as core material. It goes against the core philosophy of make decisions, not options. What I'd really like to see is a plugin that provided an easy-to-use interface for controlling the loading of these files. If no one wants to tackle this, I'll be more than happy to look into the feasibility of doing this in a month or two after knocking out some other projects.