Under review

Optimization for performance

lefaek 1 month ago updated 1 month ago 2

This script is amazing but too heavy. It could be lighter. Some tips for speed are:

1. All of anwp scripts and css loads in every page even not used. I use asset clean up and unload scripts that are not used in every pages. You can unload js/css by page/post or by post type ex. From all matches/clubs/etc pages.

I find what some js do. Echarts is for charts of course, easytimer is for livescore, datatables for player stats. But I don't know what propper/polyfilled/modal/airbnb does.

2. The script loads the original club image which is 150x150px (api import) and about 30kb. Is it possible to select to use the thumb of that image because now each of my pages has 1-1.5 mb just for club images

Under review

What about a special Settings page with the possibility to enable/disable scripts/styles.

Maybe a solution like on the screenshot below will be cool?

that would be great. Similar to asset clean up. But also include some info for what each JS does/used in. So we know where to disable