Few days ago one of my client ask me helping to increase GTmetrix score. While checking I found Contact Form 7 script is loading in homepage and it is hampering the score. Though the Hompage doesn’t have Contact Form to show. To increase the score, it was wise to load the Contact Form 7 script to load only in Contact Page.
To solve this issue I used this code which helps me the Contact Form 7 script not to load in Homepage, but only in Contact page where the form is used. Just use the code below in your theme’s function.php