Hi jje007, first of all a Warm Welcome to WebmasterWorld!
It can be either a bad host or bad programming. I assume that you are using shared hosting which makes it difficult to check performance on the server itself.
The first thing you may want to do is check if you see delays when loading images from the server. If this is the case, it is certainly your hosting which causes the problem because the loading of images is not dependent on your PHP script programming.
The second thing to test is to use a medium complex PHP script without MySQL calls which generates a page and see if that causes problems. If this is the case, the server itself is overloaded.
The last thing to test is using a PHP page which uses the MySQL back-end to read or store data. Often in shared hosting configurations the MySQL server is run on a separate server and that server may be overloaded or the network connection between the servers may be slow.