93% woocommerce-checkout-password-strength-meter

Code Review | WooCommerce Checkout Password Strength Meter

WordPress plugin WooCommerce Checkout Password Strength Meter scored 93% from 54 tests.

About plugin

  • Plugin page: woocommerce-check...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 5.8.1
  • First release: Sep 2, 2013
  • Latest release: Sep 2, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: corsonr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,038 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼143.33ms] Passed 4 tests

Server-side resources used by WooCommerce Checkout Password Strength Meter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1231.06 ▲10.18
Dashboard /wp-admin3.07 ▲0.0147.38 ▲2.38
Posts /wp-admin/edit.php3.12 ▲0.0146.34 ▼0.35
Add New Post /wp-admin/post-new.php5.43 ▼0.0093.30 ▼560.78
Media Library /wp-admin/upload.php3.01 ▲0.0028.13 ▼14.57

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WooCommerce Checkout Password Strength Meter: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.87 ▲0.339.02 ▼5.0646.66 ▼2.27
Dashboard /wp-admin2,967 ▲365.96 ▼0.25150.69 ▼24.23111.08 ▼8.97
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0064.92 ▲1.2494.12 ▲5.60
Add New Post /wp-admin/post-new.php1,683 ▲17918.67 ▲0.11395.55 ▲4.89108.39 ▼0.30
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.01152.55 ▲2.69115.89 ▲1.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/woocommerce-checkout-password-strength-meter/woo-checkout-password-strength-meter.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (The password strength meter on the checkout page), #2 (Password too weak), #3 (Mismatch), #4 (Good password), #5 (Strong Password)
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

woocommerce-checkout-password-strength-meter/woo-checkout-password-strength-meter.php 85% from 13 tests

The entry point to "WooCommerce Checkout Password Strength Meter" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-checkout-password-strength-meter.php" instead of "woo-checkout-password-strength-meter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected154 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File14810457
JavaScript17147
PHP1246035
CSS11015

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png9.27KB3.70KB▼ 60.08%
screenshot-4.png9.05KB3.63KB▼ 59.91%
screenshot-1.png10.64KB4.13KB▼ 61.23%
screenshot-3.png8.16KB3.20KB▼ 60.78%
screenshot-2.png10.39KB4.04KB▼ 61.14%