facebook-for-woocommerce
facebook-for-woocommerce copied to clipboard
Assets performance suggestions + DB query optimisations
Loading in the header of all administration pages. It should load in the footer using "defer" and only when necessary /wp-content/plugins/facebook-for-woocommerce/assets/js/admin/google-product-category-fields.js /wp-content/plugins/facebook-for-woocommerce/assets/js/facebook-infobanner.min.js?ver=2.4.1
It loads in all the administration pages, and it is not minified /wp-content/plugins/facebook-for-woocommerce/assets/css/facebook-infobanner.css?ver=2.4.1
Duplicate queries and they are made outside the administration page /wp-admin/admin.php?page=wc-facebook
SELECT option_value FROM cr6wPeGq_options WHERE option_name = 'wc_facebook_background_handle_virtual_products_variations_complete' LIMIT 1
SELECT option_value FROM cr6wPeGq_options WHERE option_name = 'wc_facebook_enable_debug_mode' LIMIT 1
Thanks for the suggestions @Camilo517 !
It looks like you're reporting two issues - it's helpful for us if each issue is reported separately. Please also include details of what how the issue affects your store. This helps us understand the severity and prioritise fixes.
Yeah, WP admin asset management is a real dumpster :fire: Because frontend gets measured by 10 different tools and SEO penalties, everybody's worried about what they load. But in WP admin it's apparently OK to load 100 "irrelevant to current screen" scripts and stylesheets.
https://developer.wordpress.org/reference/functions/get_current_screen/ is your enqueue conditional friend, everyone.
@budzanowski Please
Duplicate queries and they are made outside the administration page /wp-admin/admin.php?page=wc-facebook
SELECT option_value FROM cr6wPeGq_options WHERE option_name = 'wc_facebook_background_handle_virtual_products_variations_complete' LIMIT 1
SELECT option_value FROM cr6wPeGq_options WHERE option_name = 'wc_facebook_enable_debug_mode' LIMIT 1
These are related to async job functionality, they would run outside of the FB admin screen. I decided not to address this topic on this issue ticket.
PR #2331 addresses the issue with admin/google-product-category-fields.js. As for the infobanner asset, we'll wait until we audit the WC_Facebookcommerce_Info_Banner class. See #1981
Thanks.