62% mybox-b2b

Code Review | Mybox B2B

WordPress plugin Mybox B2B scored62%from 54 tests.

About plugin

  • Plugin page: mybox-b2b
  • Plugin version: 3.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2020
  • Latest release: Jan 14, 2022
  • Number of updates: 14
  • Update frequency: every 42.0 days
  • Top authors: one2tek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,480 total downloads

Benchmarks

Plugin footprint 65% 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.15MB] [CPU: ▼6.82ms] Passed 4 tests

Server-side resources used by Mybox B2B
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.88 ▼0.39
Dashboard /wp-admin3.45 ▲0.1545.58 ▼4.05
Posts /wp-admin/edit.php3.57 ▲0.2147.89 ▼3.93
Add New Post /wp-admin/post-new.php6.05 ▲0.1683.74 ▼18.92
Media Library /wp-admin/upload.php3.38 ▲0.1438.42 ▲4.32
Mybox XA /wp-admin/admin.php?page=mybox-settings-xa3.3330.97
Mybox Settings /wp-admin/admin.php?page=mybox-settings3.3231.38

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 44 new files
Database: 1 new table, 6 new options
New tables
wp_mybox_settings
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Mybox B2B
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲17513.95 ▼0.434.59 ▲2.9643.90 ▲0.99
Dashboard /wp-admin2,230 ▲425.84 ▲0.94101.01 ▲0.0539.57 ▼4.34
Posts /wp-admin/edit.php2,116 ▲272.01 ▲0.0141.00 ▼0.6034.34 ▼2.62
Add New Post /wp-admin/post-new.php1,542 ▲923.06 ▼0.29657.52 ▼41.0452.67 ▲1.05
Media Library /wp-admin/upload.php1,415 ▲334.23 ▼0.0794.40 ▼5.6641.07 ▼1.35
Mybox XA /wp-admin/admin.php?page=mybox-settings-xa1,0841.6829.5926.22
Mybox Settings /wp-admin/admin.php?page=mybox-settings8282.0625.0626.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_mybox_settings
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=mybox-settings-xa
    • > Notice in wp-content/plugins/mybox-b2b/admin/class-mybox-b2b-admin.php+321
    Undefined index: resend
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mybox-settings
    • > Notice in wp-content/plugins/mybox-b2b/admin/class-mybox-b2b-admin.php+457
    Trying to access array offset on value of type bool

SRP 0% from 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
Please take a closer look at the following
  • 7× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mybox-b2b/public/partials/mybox-b2b-public-display.php
    • > /wp-content/plugins/mybox-b2b/partials/mybox-b2b-admin-display.php
    • > /wp-content/plugins/mybox-b2b/print-file.php
    • > /wp-content/plugins/mybox-b2b/admin/barcode.php
    • > /wp-content/plugins/mybox-b2b/barcode.php
    • > /wp-content/plugins/mybox-b2b/admin/partials/mybox-b2b-admin-display.php
    • > /wp-content/plugins/mybox-b2b/admin/print-file.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mybox-b2b/class-mybox-b2b-admin.php on line 27
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/mybox-b2b/admin/class-mybox-b2b-admin.php on line 27
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/mybox-b2b/class-mybox-b2b-admin.php on line 27
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/mybox-b2b/admin/class-mybox-b2b-admin.php on line 27
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/mybox-b2b/class-mybox-b2b-admin.php on line 27
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mybox-b2b/admin/class-mybox-b2b-admin.php on line 27

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 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
  • Donate link: Invalid URI ("oplatform.myboxlogistics.io")
The official readme.txt might help

mybox-b2b/mybox-b2b.php Passed 13 tests

The main file in "Mybox B2B" v. 3.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
100 characters long description:
This plugin connects to Mybox API automatically trigger shipment request when sold with woocommerce.

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 plugin1,475 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP152665701,101
JavaScript33527201
CSS422294152
SVG10021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.58
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods72
▷ Static methods68.33%
▷ Public methods6793.06%
▷ Protected methods00.00%
▷ Private methods56.94%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.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
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/logo.png11.51KB4.18KB▼ 63.66%
admin/img/logo-mybox-exp.png7.82KB5.17KB▼ 33.89%
img/logo.png11.51KB4.18KB▼ 63.66%
logo-mybox-bw.png7.82KB5.17KB▼ 33.89%