If you do not know, then WordPress is still using jQuery v1.12.4 and jQuery Migrate v1.4.1. These can be seen as 2 pretty old jQuery versions when the newest jQuery has been up to v3.6.0. These versions of jQuery still have serious security flaws. That’s why you will be warned when checking your website with Google Lighthouse. The only way to fix this problem is to update jQuery to the latest version.
Why is WordPress still using old jQuery version?
Google Lighthouse privacy warning for jQuery v1.12.4:
WordPress is still loyal to jQuery v1.12.4 and jQuery Migrate v1.4.1 probably because many themes and plugins are still operating based on them. Upgrading jQuery to a higher version will cause these themes and plugins to crash. Therefore, you must ensure that the themes and plugins you are using do not require the old jQuery version before proceeding with the upgrade.
Update jQuery & jQuery Migrate in WordPress
In WordPress, you can do this easily thanks to a plugin called jQuery Updater.
All you need to do is install and activate it. Then, clear the web cache and browser cache (if any) and check the results through the Chrome Developer Tools (press CTRL + SHIFT + I and select the Console tab). If you get a message that looks like this, you have successfully upgraded:
In case the website has jQuery related problems after the upgrade, you need to disable the jQuery Updater plugin and delete it. The website will automatically revert to the default jQuery version of WordPress. It’s simple, right? Good luck!