84% wholesale-customers-for-woo

Code Review | Wholesale Customers For WooCommerce

WordPress plugin Wholesale Customers For WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: wholesale-custome...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.0
  • WordPress version: 6.3.1
  • First release: Sep 1, 2017
  • Latest release: Aug 14, 2023
  • Number of updates: 33
  • Update frequency: every 65.9 days
  • Top authors: andrewza (81.82%)Jarryd Long (15.15%)yoohooplugins (9.09%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 5,417 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.99ms] Passed 4 tests

An overview of server-side resources used by Wholesale Customers For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.03 ▲1.15
Dashboard /wp-admin3.37 ▲0.0747.00 ▼2.62
Posts /wp-admin/edit.php3.42 ▲0.0750.56 ▲4.33
Add New Post /wp-admin/post-new.php5.95 ▲0.0790.41 ▼12.03
Media Library /wp-admin/upload.php3.30 ▲0.0736.50 ▲1.55

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wholesale Customers For WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.471.60 ▼0.1042.89 ▲0.36
Dashboard /wp-admin2,206 ▲154.84 ▼0.03107.39 ▲3.2338.05 ▼2.91
Posts /wp-admin/edit.php2,086 ▼32.15 ▲0.1639.66 ▲4.9434.58 ▲0.54
Add New Post /wp-admin/post-new.php1,533 ▼023.25 ▲0.03668.94 ▲68.4355.52 ▲5.10
Media Library /wp-admin/upload.php1,391 ▼04.25 ▼0.01103.69 ▲8.6945.53 ▲1.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wholesale-customers-for-woo/wholesale-customers-settings.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: woocommerce wholesale, woocommerce wholesale pricing, woocommerce, wholesale pricing, wholesale plugin...

wholesale-customers-for-woo/wholesale-customers-for-woo.php 92% from 13 tests

The entry point to "Wholesale Customers For WooCommerce" version 1.0.6 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.6" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin284 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP314875284

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin