Optimization Checklist
- Remove default jquery and jquery migrate from frontend if theme is completely custom made
- Add latest jquery (version 3.5 at the time of writing this article)
- Add Critical CSS inline directly in header and rest of the CSS in footer
- Remove default theme CSS – style.css file from header as most of the times it becomes render blocking and doesn’t have the code
- Remove all scripts from header and footer
- Enqueue all JS files with functions.php
- Remove all CSS files from header.php and footer.php
- Enqueue all CSS with functions.php
- Use Image Lazyload (Either using autoptimize or directly)
- Add all homepage background images inline so they can be lazyloaded
- Remove scripts from homepage which server no purpose
- Use BEM css instead, it’s renders faster on mobile devices
- Remove line awesome, font-awesome, add SVG icons (Guide here to convert font awesome and line awesome to SVG)
- Remove CF7 scripts from css from homepage if there is no contact form on homepage
- For google maps, load maps on scroll instead on window load and document ready.