83% add-customer-for-woocommerce

Code Review | Add Customer for WooCommerce

WordPress plugin Add Customer for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: add-customer-for-...
  • Plugin version: 1.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 1, 2020
  • Latest release: Sep 22, 2023
  • Number of updates: 60
  • Update frequency: every 17.1 days
  • Top authors: dansart (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /11,875 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.19MB] [CPU: ▼5.82ms] Passed 4 tests

A check of server-side resources used by Add Customer for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1847.80 ▲6.77
Dashboard /wp-admin3.49 ▲0.1954.04 ▼1.61
Posts /wp-admin/edit.php3.61 ▲0.2550.84 ▼7.28
Add New Post /wp-admin/post-new.php6.07 ▲0.1997.07 ▲2.61
Media Library /wp-admin/upload.php3.42 ▲0.1938.27 ▼16.98
Add Customer Settings /wp-admin/options-general.php?page=wac-options3.4538.28

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Add Customer for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.30 ▼1.081.68 ▼0.2246.29 ▲0.70
Dashboard /wp-admin2,210 ▲225.83 ▲0.88102.22 ▼1.3139.41 ▼0.83
Posts /wp-admin/edit.php2,096 ▲42.05 ▲0.0440.62 ▼2.7535.08 ▼2.50
Add New Post /wp-admin/post-new.php1,536 ▲1623.26 ▲0.26666.63 ▼32.0455.58 ▼2.88
Media Library /wp-admin/upload.php1,395 ▲134.22 ▼0.01100.04 ▼1.5641.01 ▼2.56
Add Customer Settings /wp-admin/options-general.php?page=wac-options9472.0224.3033.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/add-customer-for-woocommerce/examples/hooks.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
Attributes that require attention:
  • License uri: Invalid URI found ("")
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

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

"Add Customer for WooCommerce" version 1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected1,692 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP161755111,061
PO File3171193524
JavaScript2113957
CSS2101250

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity26.60
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods43
▷ Static methods12.33%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions00.00%
▷ Anonymous functions10100.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
There were not PNG files found in your plugin