73% boxtal-connect

Code Review | Boxtal - Shipping solution

WordPress plugin Boxtal - Shipping solution scored73%from 54 tests.

About plugin

  • Plugin page: boxtal-connect
  • Plugin version: 1.2.20
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.14-6.3
  • WordPress version: 6.3.1
  • First release: Oct 19, 2018
  • Latest release: Sep 29, 2023
  • Number of updates: 61
  • Update frequency: every 29.6 days
  • Top authors: boxtal (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

9,000+ active /113,640 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.48ms] Passed 4 tests

A check of server-side resources used by Boxtal - Shipping solution
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.80 ▼2.17
Dashboard /wp-admin3.33 ▲0.0350.13 ▲1.75
Posts /wp-admin/edit.php3.44 ▲0.0952.55 ▲1.31
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.94 ▼2.81
Media Library /wp-admin/upload.php3.25 ▲0.0342.22 ▲8.09

Server storage [IO: ▲0.93MB] [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: 93 new files
Database: 1 new table, 8 new options
New tables
wp_bw_pricing_items
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
BW_NOTICES
BW_NOTICE_environment-warning
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Boxtal - Shipping solution
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲8013.58 ▼0.661.99 ▼0.0237.57 ▼4.49
Dashboard /wp-admin2,218 ▲444.85 ▼0.01109.10 ▼5.4345.02 ▼2.74
Posts /wp-admin/edit.php2,104 ▲292.02 ▲0.0439.86 ▲2.3634.91 ▼0.17
Add New Post /wp-admin/post-new.php1,536 ▲318.55 ▼4.55620.10 ▼62.2952.54 ▲2.22
Media Library /wp-admin/upload.php1,403 ▲124.24 ▲0.0296.48 ▼2.9343.19 ▲0.45

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
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_bw_pricing_items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • 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 no errors were found, this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/boxtal-connect/boxtal-connect.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'Boxtal\\BoxtalConnectWoocommerce\otice\\Abstract_Notice' not found in wp-content/plugins/boxtal-connect/Boxtal/BoxtalConnectWoocommerce/notice/class-pairing-notice.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Boxtal\\BoxtalConnectWoocommerce\otice\\Abstract_Notice' not found in wp-content/plugins/boxtal-connect/Boxtal/BoxtalConnectWoocommerce/notice/class-environment-warning-notice.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Boxtal\\BoxtalConnectWoocommerce\otice\\Abstract_Notice' not found in wp-content/plugins/boxtal-connect/Boxtal/BoxtalConnectWoocommerce/notice/class-custom-notice.php:15
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/boxtal-connect/boxtal-connect.php on line 19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/boxtal-connect/boxtal-connect.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/boxtal-connect/Boxtal/BoxtalConnectWoocommerce/shipping-method/class-shipping-method.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Boxtal\\BoxtalConnectWoocommerce\otice\\Abstract_Notice' not found in wp-content/plugins/boxtal-connect/Boxtal/BoxtalConnectWoocommerce/notice/class-pairing-update-notice.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Boxtal\\BoxtalConnectWoocommerce\otice\\Abstract_Notice' not found in wp-content/plugins/boxtal-connect/Boxtal/BoxtalConnectWoocommerce/notice/class-setup-wizard-notice.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Boxtal\\BoxtalConnectWoocommerce\otice\\Abstract_Notice' not found in wp-content/plugins/boxtal-connect/Boxtal/BoxtalConnectWoocommerce/notice/class-configuration-failure-notice.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% 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
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Screenshots: Add descriptions for screenshots #5, #5, #6, #6 in boxtal-connect/assets to your readme.txt
The official readme.txt is a good inspiration

boxtal-connect/boxtal-connect.php 85% from 13 tests

Analyzing the main PHP file in "Boxtal - Shipping solution" version 1.2.20
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.6" instead of "2.6.14")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("/Boxtal/BoxtalConnectWoocommerce/translation")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin4,800 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
PHP708212,7473,981
CSS88019807
JavaScript90109
JSON1003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity11.96
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces11
Interfaces0
Traits0
Classes47
▷ Abstract classes12.13%
▷ Concrete classes4697.87%
▷ Final classes00.00%
Methods300
▷ Static methods15852.67%
▷ Public methods27491.33%
▷ Protected methods00.00%
▷ Private methods268.67%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Boxtal/BoxtalConnectWoocommerce/assets/img/marker.png21.81KB0.31KB▼ 98.58%
Boxtal/BoxtalConnectWoocommerce/assets/img/marker-recipient.png0.40KB0.40KB0.24%
Boxtal/BoxtalConnectWoocommerce/assets/img/icon-close.png1.19KB1.22KB0.00%