First we need to determine what is a strong and weak password, this is the most obvious start. There are several types of implementations, here you can see an example comparing three different passwords in several different services:
I recommend that read the whole explanation here, just where you have this image.
Dropbox made its "password analysis system available in open source", you can see here. It has implementations in several different languages.
If you want a list with more options:
If you want a comparison, see here.
Measuring password forces is relative, by me extremely flawed. The strength of the password will be measured by a standard, a criterion you believe is safe. Even for this reason there is so much difference the result of a library and another library. The problem is that the attacker may not follow their pattern. It is impossible to determine the strength of a password if the attacker’s technique is unknown.
Even, the password "correcthorsebatterystaple" may not be considered good, according to, for example, the Bruce Schneier, this is the same password that ZXCVBN, from Dropbox, considers safer.
I personally believe that the most important thing is to allow the user to use 2FA, preferably FIDO U2F and for now also accept the TOTP. This will be the main factor, if the person discover the password will be blocked by the second authentication.
Remember to store the password correctly (using Argon2, Bcrypt, Scrypt or PBDKF2, with high difficulties), this delay of "offline" attacks if your database has been compromised.
I suggest using the plugin jQuery Complexify: http://www.devmedia.com.br/verificando-a-forca-da-senha-com-o-plugin-jquery-complexify/27088
– user75204