84% wholesale-market

Code Review | Wholesale Market

WordPress plugin Wholesale Market scored84%from 54 tests.

About plugin

  • Plugin page: wholesale-market
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 30, 2016
  • Latest release: Dec 9, 2022
  • Number of updates: 82
  • Update frequency: every 29.8 days
  • Top authors: cedcommerce (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

500+ active /18,849 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.47ms] Passed 4 tests

An overview of server-side resources used by Wholesale Market
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.71 ▼8.73
Dashboard /wp-admin3.31 ▲0.0046.60 ▲0.32
Posts /wp-admin/edit.php3.36 ▲0.0046.62 ▼3.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.75 ▼3.71
Media Library /wp-admin/upload.php3.23 ▲0.0034.12 ▼1.54

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 80 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Wholesale Market
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.034.73 ▲2.7740.89 ▼0.70
Dashboard /wp-admin2,206 ▲155.83 ▲0.7497.64 ▼10.2439.44 ▼2.24
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0037.33 ▼4.0832.11 ▼9.82
Add New Post /wp-admin/post-new.php1,533 ▼923.02 ▲4.71601.77 ▼54.9159.95 ▼3.52
Media Library /wp-admin/upload.php1,391 ▲64.28 ▲0.0498.10 ▼0.3842.18 ▼0.88

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wholesale-market/addons/wholesale-request/widgets/wholesale-request-widgets.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: woocommerce, wholesale customer, woocommerce wholesale, wholesale prices, woocommerce wholesale pricing...

wholesale-market/wholesale-market.php 92% from 13 tests

The entry point to "Wholesale Market" version 2.2.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 173 characters long)

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 detected6,345 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP286101,2743,750
CSS1097401,448
JavaScript98016653
PO File1209272494

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity20.65
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods155
▷ Static methods149.03%
▷ Public methods15398.71%
▷ Protected methods00.00%
▷ Private methods21.29%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/cross.png1.74KB1.79KB0.00%
assets/images/cedcommerce.png2.21KB1.28KB▼ 42.26%
addons/wholesale-request/assets/images/cancel.png0.55KB0.31KB▼ 44.19%
assets/images/promotional.png48.11KB19.02KB▼ 60.47%
addons/wholesale-request/assets/images/accept.png0.77KB0.53KB▼ 31.82%