78% woo-wholesale-pricing

Code Review | Wholesale For WooCommerce Lite - B2B & B2C Solution

WordPress plugin Wholesale For WooCommerce Lite - B2B & B2C Solution scored78%from 54 tests.

About plugin

  • Plugin page: woo-wholesale-pri...
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: May 1, 2017
  • Latest release: May 24, 2022
  • Number of updates: 131
  • Update frequency: every 15.5 days
  • Top authors: allendevelopers (57.25%)wpexpertsio (43.51%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /27,304 total downloads

Benchmarks

Plugin footprint 65% from 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: ▲4.62MB] [CPU: ▲22.48ms] Passed 4 tests

Server-side resources used by Wholesale For WooCommerce Lite - B2B & B2C Solution
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.50 ▲5.0463.93 ▲21.87
Dashboard /wp-admin8.52 ▲5.2274.58 ▲20.62
Posts /wp-admin/edit.php8.52 ▲5.1679.48 ▲27.63
Add New Post /wp-admin/post-new.php8.96 ▲3.07118.89 ▲19.79
Media Library /wp-admin/upload.php8.52 ▲5.2975.65 ▲34.32
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5261.49

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 185 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
fs_gdpr
fs_accounts
fs_active_plugins
db_upgraded
widget_recent-posts
fs_debug_mode
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Wholesale For WooCommerce Lite - B2B & B2C Solution
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.17 ▼1.211.66 ▼0.1029.22 ▼13.77
Dashboard /wp-admin2,246 ▲586.03 ▲0.18107.67 ▼8.0345.83 ▲2.87
Posts /wp-admin/edit.php2,129 ▲402.12 ▲0.1241.61 ▲6.2739.74 ▲3.51
Add New Post /wp-admin/post-new.php1,538 ▲517.61 ▼5.14698.41 ▲45.2755.93 ▼0.54
Media Library /wp-admin/upload.php1,428 ▲374.15 ▼0.06113.82 ▲14.6652.94 ▲8.30
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0721.7228.2131.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/woo-wholesale-pricing/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 10 options
    • can_compress_scripts
    • widget_recent-comments
    • fs_debug_mode
    • fs_active_plugins
    • widget_recent-posts
    • fs_gdpr
    • db_upgraded
    • widget_theysaidso_widget
    • fs_accounts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: You can take inspiration from this readme.txt

woo-wholesale-pricing/wholesale-for-woocommerce-free.php 69% from 13 tests

"Wholesale For WooCommerce Lite - B2B & B2C Solution" version 1.6.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 471 characters long)
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "3.0")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-wholesale-pricing.php" instead of "wholesale-for-woocommerce-free.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin35,375 lines of code in 137 files:
LanguageFilesBlank linesComment linesLines of code
PHP1177,46416,16733,408
CSS1290731,450
JavaScript55459256
Markdown2770234
JSON10027

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity85.56
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.91
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes00.00%
Methods1,201
▷ Static methods17614.65%
▷ Public methods86171.69%
▷ Protected methods151.25%
▷ Private methods32527.06%
Functions101
▷ Named functions101100.00%
▷ Anonymous functions00.00%
Constants126
▷ Global constants10180.16%
▷ Class constants2519.84%
▷ Public constants25100.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
5 PNG files occupy 0.33MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wholesale-banner.png262.53KB97.43KB▼ 62.89%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/wc-wholesale-lite.png9.16KB5.26KB▼ 42.58%
assets/images/builder.png43.06KB18.66KB▼ 56.67%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%