I am just wondering how much would improve performance if we replace all bloginfo function in wordpress installation with static data – for example instead of bloginfo(‘template_url’) to use http://blog.com/wp-content/themes/theme, and so on.
Second question is: Is there a way to automaticly pass through all files in plugin and themes directory and replace all bloginfo functions that we want to replace with static string?
Thank you for your time and best regards?
For your first question, WordPress always performs some basic queries on every load and one of these reads the data used by the bloginfo calls. So using then in a template does add the very slight overhead of the function call, but it does not add any additional query overhead. Pretty negligible unless you are serving millions of hits a day.
Second question: it would be pretty trivial to write a script that does such a replacement. I really don’t think it is warranted or necessary, but yes, it could be done.