Menu

Post image 1
Post image 2
1 / 2
0

I Tested 50 WordPress Sites. They All Had the Same 10 Problems.

DEV Community·ehonep·about 1 month ago
#RXqTr3gs
Reading 0:00
15s threshold

I optimize WordPress sites for a living. After working on 50+ sites, I can tell you: they all have the same 10 problems. Here's what's slowing down your site — and the exact code to fix each one. 1. WordPress Loads Emoji Scripts on Every Page You probably don't use WordPress emojis. Nobody does. But WordPress loads the detection script on every single page. // Add to functions.php or mu-plugins remove_action ( 'wp_head' , 'print_emoji_detection_script' , 7 ); remove_action ( 'wp_print_styles' , 'print_emoji_styles' ); remove_action ( 'admin_print_scripts' , 'print_emoji_detection_script' ); remove_action ( 'admin_print_styles' , 'print_emoji_styles' ); Enter fullscreen mode Exit fullscreen mode Savings: ~20KB per page load. 2. jQuery Migrate Is Still Loading WordPress loads jQuery Migrate for backwards compatibility with plugins written in 2012. If your plugins are up to date, you don't need it. add_action ( 'wp_default_scripts' , function ( $scripts ) { if ( !…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More