https://gtmetrix.com , free user account, Structure (tab):
It tested my homepage, which does not require password strength indicator (zxcvbn.min.js), which file size is concerning high (300kB+ seems questionable size even on a rarely used registration form, to my taste absolutely unacceptable on slow internet connections).
grep -Rial zxcvbn .
./wp-admin/js/user-profile.min.js
./wp-admin/js/password-strength-meter.min.js
./wp-admin/js/user-profile.js
./wp-admin/js/password-strength-meter.js
./wp-includes/js/zxcvbn-async.js
./wp-includes/js/zxcvbn-async.min.js
./wp-includes/js/zxcvbn.min.js
./wp-includes/script-loader.php
So there is one way to disable it, using Code snippets plugin:
// disable 300kB+ large zxcvbn.min.js password strength indicator in wordpress
// https://stackoverflow.com/a/51840450
add_action('wp_print_scripts', 'remove_password_strength_meter');
function remove_password_strength_meter() {
// Deregister script about password strenght meter
wp_dequeue_script('zxcvbn-async');
wp_deregister_script('zxcvbn-async');
}
(this may still make WP return “Function WP_Scripts::add was called incorrectly. The script with the handle “password-strength-meter” was enqueued with dependencies that are not registered: zxcvbn-async. (This message was added in version 6.9.1.)”)
Would you consider fixing this by default for everyone so it is loaded only when registration form is called? Or not used at all considering its size? Maybe you can make a fork of that .js which would not contain phrases considered weak (significantly reducing the .js file size).
