88% b2bking-wholesale-for-woocommerce

Code Review | B2BKing — Ultimate WooCommerce Wholesale and B2B Solution — Wholesale Order Form, Catalog Mode, Dynamic Pricing & More

WordPress plugin B2BKing — Ultimate WooCommerce Wholesale and B2B Solution — Wholesale Order Form, Catalog Mode, Dynamic Pricing & More scored88%from 54 tests.

About plugin

  • Plugin page: b2bking-wholesale...
  • Plugin version: 4.6.62
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 12, 2020
  • Latest release: Nov 28, 2023
  • Number of updates: 130
  • Update frequency: every 9.0 days
  • Top authors: webwizardsdev (100%)

Code review

54 tests

User reviews

58 reviews

Install metrics

7,000+ active /108,464 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.32MB] [CPU: ▲11.46ms] Passed 4 tests

Server-side resources used by B2BKing — Ultimate WooCommerce Wholesale and B2B Solution — Wholesale Order Form, Catalog Mode, Dynamic Pricing & More
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.84 ▲1.3745.75 ▲6.77
Dashboard /wp-admin6.07 ▲2.7661.11 ▲11.43
Posts /wp-admin/edit.php6.07 ▲2.7164.72 ▲13.03
Add New Post /wp-admin/post-new.php8.33 ▲2.43109.41 ▲14.67
Media Library /wp-admin/upload.php6.07 ▲2.8350.27 ▲14.59

Server storage [IO: ▲8.69MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 195 new files
Database: no new tables, 13 new options
New WordPress options
b2bking_plugin_status_setting
b2bking_main_active
widget_recent-posts
db_upgraded
b2bking_update_sort_number_menu_order
b2bking_individual_role_id_setting
widget_recent-comments
b2bking_b2b_role_id_setting
b2bking_please_select_role_id_setting
b2bking_b2bgroup_id_setting
...

Browser metrics Passed 4 tests

Checking browser requirements for B2BKing — Ultimate WooCommerce Wholesale and B2B Solution — Wholesale Order Form, Catalog Mode, Dynamic Pricing & More
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲2214.33 ▼0.011.75 ▼0.0236.62 ▼4.82
Dashboard /wp-admin2,217 ▲395.66 ▼0.0495.36 ▼16.1043.71 ▲2.78
Posts /wp-admin/edit.php2,120 ▲172.06 ▲0.0541.18 ▼1.6835.86 ▼1.45
Add New Post /wp-admin/post-new.php1,540 ▲323.41 ▼1.68676.99 ▲68.7650.58 ▼18.90
Media Library /wp-admin/upload.php1,419 ▲194.22 ▲0.0198.15 ▲0.7541.94 ▼2.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 13 options
    • b2bking_plugin_status_setting
    • widget_recent-comments
    • b2bking_please_select_role_id_setting
    • widget_recent-posts
    • b2bking_b2b_role_id_setting
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • b2bking_update_sort_number_menu_order
    • db_upgraded
    • b2bking_b2bgroup_id_setting
    • ...

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

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

b2bking-wholesale-for-woocommerce/b2bking.php 77% from 13 tests

"B2BKing — Ultimate WooCommerce Wholesale and B2B Solution — Wholesale Order Form, Catalog Mode, Dynamic Pricing & More" version 4.6.62's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("b2bking-wholesale-for-woocommerce.php" instead of "b2bking.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.8" instead of "5.0.0")
  • 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 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin49,980 lines of code in 114 files:
LanguageFilesBlank linesComment linesLines of code
CSS812554719,201
PHP212,5031,48716,312
SVG1221129,298
JavaScript148851,2123,917
JSON5811401,248
Markdown1304

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,367)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity267.45
▷ Minimum class complexity4.00
▷ Maximum class complexity1,367.00
Average method complexity7.10
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods245
▷ Static methods7229.39%
▷ Public methods245100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions84
▷ Named functions55.95%
▷ Anonymous functions7994.05%
Constants2
▷ Global constants2100.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
46 compressed PNG files occupy 0.66MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/images/module-import.png12.20KB12.84KB0.00%
includes/assets/images/screenshot_info_tables.png13.47KB5.30KB▼ 60.66%
includes/assets/images/module-orderform.png14.76KB15.98KB0.00%
includes/assets/images/module-company.png17.15KB18.19KB0.00%
includes/assets/images/module-rules1.png14.50KB15.60KB0.00%