What is the best way for me to test my PHP code\'s performance?
You should consider using ab (apache benchmark tool) to run a large number of queries and xhprof to profile/analyse your code. In my opinion, these just are the basics but give great results.