78% woocommerce-wholesale-manager

Code Review | Woocommerce Wholesale Manager

WordPress plugin Woocommerce Wholesale Manager scored78%from 54 tests.

About plugin

  • Plugin page: woocommerce-whole...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Nov 1, 2014
  • Latest release: Nov 1, 2014
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: ferozjaf (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,855 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.63MB] [CPU: ▼14.16ms] Passed 4 tests

A check of server-side resources used by Woocommerce Wholesale Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0750.96 ▲4.69
Dashboard /wp-admin3.36 ▲0.0650.07 ▼2.10
Posts /wp-admin/edit.php3.41 ▲0.0554.66 ▼0.58
Add New Post /wp-admin/post-new.php3.20 ▼2.6938.00 ▼53.37
Media Library /wp-admin/upload.php3.28 ▲0.0535.41 ▼0.57
Woo Wholesale Manager /wp-admin/index.php?page=manage-wholesale-pricing3.2945.95

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
bg_save_label
theysaidso_admin_options
bg_wholesale_role
widget_recent-posts
widget_recent-comments
can_compress_scripts
bg_wholesale_label
bg_regular_label

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce Wholesale Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.22 ▼0.421.82 ▼0.4140.90 ▼3.24
Dashboard /wp-admin2,202 ▲255.64 ▲0.0689.60 ▲0.6842.15 ▼2.48
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0339.26 ▼5.6735.83 ▼4.22
Add New Post /wp-admin/post-new.php1,538 ▲118.07 ▼0.10589.65 ▼38.8271.52 ▲10.67
Media Library /wp-admin/upload.php1,404 ▲104.23 ▲0.1399.55 ▼2.7144.45 ▼0.10
Woo Wholesale Manager /wp-admin/index.php?page=manage-wholesale-pricing9741.9928.2539.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 10 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • bg_regular_label
    • bg_wholesale_label
    • widget_recent-posts
    • widget_recent-comments
    • bg_save_label
    • bg_wholesale_role
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 output text when accessed directly:
    • > /wp-content/plugins/woocommerce-wholesale-manager/bg-form.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-wholesale-manager/index.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/woocommerce-wholesale-manager/bg-form.php:685

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Screenshots. http://www.bilogicit.com/screenshots/) image not found
  • Plugin Name: Please specify the plugin name on the first line ( === woocommerce-wholesale-manager === )
You can look at the official readme.txt

woocommerce-wholesale-manager/index.php 92% from 13 tests

The primary PHP file in "Woocommerce Wholesale Manager" version 1.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-wholesale-manager.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin773 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP213723773

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.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