If I install a plugin for a feature that is used in only a small percentage of my blog, why would I want site visitors to download a bunch of stuff they don’t need? The site visitor may have been referred by a search engine for a blog post that doesn’t need the plugin’s resources. Also, why would I want to make my blog slower with the extra HTTP requests? Loading resources for no reason doesn’t make sense.
Especially when using shortcodes, it’s super easy to determine if the current page needs the resources loaded. WordPress is PHP, and if you are writing a WordPress plugin, you know at least a little PHP. In the case of most code highlighter plugins, they check for <pre> tags, not shortcodes. This makes it no more difficult to determine if the plugin should load resources. Consider PHP’s stripos or strpos functions:
That’s how it’s done, now get to work!