99% add-customer-for-woocommerce

Code Review | Add Customer for WooCommerce

WordPress plugin Add Customer for WooCommerce scored 99% from 54 tests.

About plugin

  • Plugin page: add-customer-for-...
  • Plugin version: 1.4.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-5.9
  • WordPress version: 5.9.2
  • First release: Dec 1, 2020
  • Latest release: Feb 24, 2022
  • Number of updates: 32
  • Update frequency: every 14.1 days
  • Top authors: dansart (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active / 2,902 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼290.69ms] Passed 4 tests

A check of server-side resources used by Add Customer for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2056.60 ▲4.72
Dashboard /wp-admin3.56 ▲0.1535.76 ▲0.70
Posts /wp-admin/edit.php3.78 ▲0.1541.11 ▼0.95
Add New Post /wp-admin/post-new.php7.03 ▲0.0697.19 ▼1,159.81
Media Library /wp-admin/upload.php3.44 ▲0.1425.77 ▼2.68
Add Customer Settings /wp-admin/options-general.php?page=wac-options3.4424.10

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Add Customer for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4515.88 ▼0.185.95 ▼0.142.68 ▼0.52
Dashboard /wp-admin2,897 ▲426.16 ▲0.02116.83 ▼19.36154.77 ▼5.11
Posts /wp-admin/edit.php2,693 ▼13.23 ▼0.0163.79 ▲1.64141.67 ▲3.68
Add New Post /wp-admin/post-new.php1,664 ▲316.19 ▼0.68419.25 ▲22.21157.07 ▲1.77
Media Library /wp-admin/upload.php1,697 ▼15.45 ▼0.07159.61 ▲10.84189.95 ▲0.96
Add Customer Settings /wp-admin/options-general.php?page=wac-options1,1342.4354.41115.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Donate link: Invalid URI found ("")
  • License uri: Invalid URI found ("")
You can look at the official readme.txt

add-customer-for-woocommerce/add-customer-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "Add Customer for WooCommerce" version 1.4.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,115 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP9101330685
PO File3125145376
CSS181235
JavaScript271319

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity23.25
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin