83% shipments-via-sendbox

Code Review | WooCommerce Sendbox Shipping

WordPress plugin WooCommerce Sendbox Shipping scored 83% from 54 tests.

About plugin

  • Plugin page: shipments-via-sen...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 29, 2017
  • Latest release: Mar 11, 2019
  • Number of updates: 26
  • Update frequency: every 22.0 days
  • Top authors: sendbox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 819 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.37ms] Passed 4 tests

Server-side resources used by WooCommerce Sendbox Shipping
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.13 ▼7.27
Dashboard /wp-admin3.33 ▲0.0243.68 ▼4.89
Posts /wp-admin/edit.php3.38 ▲0.0245.04 ▼4.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.44 ▼13.20
Media Library /wp-admin/upload.php3.25 ▲0.0233.23 ▼0.21

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

WooCommerce Sendbox Shipping: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲20614.56 ▲0.291.76 ▼0.0242.37 ▼0.83
Dashboard /wp-admin2,344 ▲1536.36 ▲1.52116.94 ▲16.3385.53 ▲34.10
Posts /wp-admin/edit.php2,221 ▲1323.25 ▲1.2457.38 ▲16.9735.55 ▼0.39
Add New Post /wp-admin/post-new.php1,641 ▲12718.83 ▲1.29626.18 ▼32.5446.45 ▼3.18
Media Library /wp-admin/upload.php1,517 ▲1325.64 ▲1.41114.46 ▼0.5482.34 ▲33.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shipments-via-sendbox/wc-shipping-sendbox.php:532

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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 need to be fixed:
  • Screenshots: These screenshots require images: #1 (Frontend cart & checkouts), #2 (Admin panel)
  • Requires at least: Invalid plugin version format
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

shipments-via-sendbox/wc-shipping-sendbox.php 92% from 13 tests

The main PHP file in "WooCommerce Sendbox Shipping" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("shipments-via-sendbox.php" instead of "wc-shipping-sendbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,158 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13061111,052
JavaScript1200105
Markdown1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin