Hey, it's me again. If you don't know what this post is about, you can read my first post. I explained everything there.
Today we're going to take a look at the Contact Form 7 plugin with over 5 million installs.
Contact Form 7 - wp repository
- contact-form-7 (contact-form-7/includes/css/styles.css)
- contact-form-7-rtl (contact-form-7/includes/css/styles-rtl.css)
- contact-form-7 (contact-form-7/includes/js/index.js)
- swv (contact-form-7/includes/swv/js/index.js)
Best solution for this plugin is to enqueue scripts and styles only if form is printed. Otherwise they are unnecesarry.
Let's see what the plugin authors say :)
See you with the next one
Question for the readers: Would you like me to write code here that removes these assets and adds them only when needed?