89% b2bking-private-store-for-woocommerce

Code Review | Private Store for WooCommerce B2B & Wholesale by B2BKing

WordPress plugin Private Store for WooCommerce B2B & Wholesale by B2BKing scored89%from 54 tests.

About plugin

  • Plugin page: b2bking-private-s...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2020
  • Latest release: Sep 25, 2023
  • Number of updates: 16
  • Update frequency: every 70.4 days
  • Top authors: webwizardsdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /5,444 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Private Store for WooCommerce B2B & Wholesale by B2BKing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.76 ▼11.31
Dashboard /wp-admin3.34 ▲0.0354.71 ▲1.07
Posts /wp-admin/edit.php3.39 ▲0.0351.79 ▼1.41
Add New Post /wp-admin/post-new.php5.94 ▲0.0598.86 ▼0.32
Media Library /wp-admin/upload.php3.26 ▲0.0340.34 ▲3.00

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Private Store for WooCommerce B2B & Wholesale by B2BKing
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲2214.37 ▲0.021.97 ▲0.0043.74 ▼7.22
Dashboard /wp-admin2,214 ▲375.68 ▲0.0892.49 ▼4.9242.72 ▼2.69
Posts /wp-admin/edit.php2,123 ▲232.02 ▲0.0541.68 ▲0.5637.51 ▲3.11
Add New Post /wp-admin/post-new.php1,542 ▲1423.21 ▲0.08625.49 ▼69.4962.23 ▲9.95
Media Library /wp-admin/upload.php1,416 ▲164.27 ▲0.0795.89 ▼5.4747.82 ▲2.47

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: hide prices, woocommerce wholesale, hide store, woocommerce b2b, private store...

b2bking-private-store-for-woocommerce/b2bking.php 69% from 13 tests

The principal PHP file in "Private Store for WooCommerce B2B & Wholesale by B2BKing" v. 1.1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 209 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "5.0.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 ("b2bking-private-store-for-woocommerce.php" instead of "b2bking.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin3,877 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
SVG70122,972
PHP612563539
CSS320400315
JavaScript3212847
Markdown1304

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity5.50
▷ Minimum class complexity2.00
▷ Maximum class complexity10.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/lib/semantic/themes/default/assets/images/flags.png27.46KB29.21KB0.00%
includes/assets/images/logo.png10.75KB5.84KB▼ 45.73%