📄️ Introduction
Optimizing external modules is a crucial part of overall optimization.
📄️ Identifying Critical Points
To identify the critical points of a module, after activating it, we need to analyze the site using Prestashop's debug tool, which allows us to see the loading times of individual resources.
📄️ CSS or JS Present on All Pages
Sometimes, to ensure proper functionality, modules load CSS or JS files on all pages of the site. This can be problematic if the file is large or unnecessary on all pages.
📄️ PHP Code Overhead
Another issue that can arise is PHP code overhead. This can be caused by improper use of Prestashop functions, an excessive number of database queries, or inefficient resource usage.
📄️ Unnecessary CSS on Initial Load
Another issue that we may encounter is the loading of unnecessary CSS on the initial page load. This can be caused by poor use of media queries or inefficient CSS usage.
📄️ Unnecessary JS on Initial Load
JavaScript can also cause performance issues. If our module uses JS for operations, performance problems can arise if the JS is loaded synchronously when not needed.
📄️ Creating a Module Override
To extend and optimize critical parts of third-party modules, we need to create overrides for the classes and methods of interest.
📄️ Other Optimization Strategies
There are many useful practices you can implement to optimize Prestashop.