90% woo-address-validator

Code Review | WooCommerce Address Validator

WordPress plugin WooCommerce Address Validator scored90%from 54 tests.

About plugin

  • Plugin page: woo-address-valid...
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Feb 7, 2017
  • Latest release: Nov 9, 2022
  • Number of updates: 32
  • Update frequency: every 65.6 days
  • Top authors: byteplant (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /7,724 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.78ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Address Validator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.91 ▼0.66
Dashboard /wp-admin3.44 ▲0.0945.45 ▼13.70
Posts /wp-admin/edit.php3.56 ▲0.1946.32 ▲0.25
Add New Post /wp-admin/post-new.php6.04 ▲0.1581.38 ▼12.99
Media Library /wp-admin/upload.php3.36 ▲0.1335.14 ▲1.37
Address Validator /wp-admin/options-general.php?page=wcav3.3341.17

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Address Validator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.14 ▼0.211.69 ▲0.1537.94 ▼3.72
Dashboard /wp-admin2,199 ▲215.52 ▼0.1988.30 ▼14.5741.06 ▼0.13
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0735.04 ▼2.1933.37 ▼5.55
Add New Post /wp-admin/post-new.php1,538 ▲1217.99 ▼5.61583.42 ▼104.3866.44 ▲12.75
Media Library /wp-admin/upload.php1,401 ▲14.17 ▼0.0596.12 ▼3.3641.19 ▼7.45
Address Validator /wp-admin/options-general.php?page=wcav8222.0023.0627.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: checkout, validation, woocommerce, billing address, delivery...

woo-address-validator/woocommerce-address-validator.php 92% from 13 tests

"WooCommerce Address Validator" version 3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-address-validator.php" instead of "woocommerce-address-validator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin816 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP8177451632
JavaScript4171795
PO File1212189

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.14
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin