markusbegerow / wp-adv-quiz

WordPress WP-Adv-Quiz Plugin (Official)
GNU General Public License v2.0
20 stars 2 forks source link

Unnecessary query and CSS load entire site #49

Open congtoan opened 9 months ago

congtoan commented 9 months ago

I have several quiz on some page in my site. It works very well. I wanted to discuss a potential optimization for this plugin that could significantly improve performance.

The current plugin behavior loads additional CSS (css/wpAdvQuiz_front.min.css) and conducts database queries (in snapshot attachment) across the entire site, even on pages without the quiz shortcode. To enhance efficiency, could the plugin be modified to load these resources conditionally, specifically on pages where the quiz shortcode is present?

2023-11-20_15-35-24

Implementing this conditional loading feature would streamline resource usage, optimizing performance by focusing resources solely on pages where the quiz feature is utilized.

markusbegerow commented 8 months ago

Hello @congtoan,

that's possbile to optimize, but i will take a low priority on that point, because at the moment it's important to export/import the quizzes.