I have installed material design for contact form 7 on my wordpress website. The problem is that the score in google's pageSpeed has considerably worsened, since all my resources have 1 to 2kb of load (except bootstrap which has 20kb). But Material design is 23kb .. and it makes the score much worse. Is there a way to make material design consume less resources? Any .min version or something?
The plugin creators have told me to include the following code, but it doesn't help me... do you know if something is wrong or can be written in a more efficient way?
function graficoantonio_dequeue_cf7md() {
if( !is_page( 'contacto' ) ) {
wp_dequeue_script( 'autosize' );
wp_dequeue_script( 'cf7-material-design' );
wp_dequeue_style( 'cf7md_roboto' );
wp_dequeue_style( 'cf7-material-design' );
}
}
add_action( 'wp_print_scripts', 'graficoantonio_dequeue_cf7md', 100 );
The support of the plugin has answered me, I leave here the link of the answer:
https://wordpress.org/support/topic/material-design-slows-considerably-the-loading-of-my-web/#post-11760268