I did code optimization for my site.
My site has a lot of plugins and became very slowly too. But I just used some cache plugin + replaced permanent static php strings in header.phph by html code from browser + did the same with footer + added mod_gzip for css/html/php/js/ajax in .htaccess.
Now I am so happy, because site response time is good enough.