78% woo-shipperhq

Code Review | ShipperHQ for WooCommerce

WordPress plugin ShipperHQ for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: woo-shipperhq
  • Plugin version: 1.6.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2017
  • Latest release: Nov 27, 2023
  • Number of updates: 72
  • Update frequency: every 31.5 days
  • Top authors: shipperhq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /7,164 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.73ms] Passed 4 tests

An overview of server-side resources used by ShipperHQ for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.93 ▼1.69
Dashboard /wp-admin3.32 ▲0.0144.87 ▼2.51
Posts /wp-admin/edit.php3.37 ▲0.0147.49 ▲2.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.65 ▼13.00
Media Library /wp-admin/upload.php3.24 ▲0.0136.45 ▲2.27

Server storage [IO: ▲1.90MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 239 new files
Database: no new tables, 6 new options
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

ShipperHQ for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.24 ▼0.122.05 ▲0.2943.39 ▼1.05
Dashboard /wp-admin2,195 ▲145.58 ▼0.1494.14 ▼8.1039.36 ▲0.80
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0138.80 ▲2.6836.30 ▲2.93
Add New Post /wp-admin/post-new.php1,526 ▼323.23 ▲0.09677.90 ▲36.4454.23 ▼1.26
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.12100.27 ▲5.0943.46 ▲2.90

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-shipperhq/includes/external/lib/jsonmapper/example/run.php
  • 91× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ShipperHQ\\WS\\AbstractWebServiceRequest' not found in wp-content/plugins/woo-shipperhq/includes/external/lib/library-ws/src/PostOrder/Placeorder/Request/PlaceOrderRequest.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\OpenSSL' not found in wp-content/plugins/woo-shipperhq/includes/external/lib/jwt/src/Signer/Rsa.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Claim\\Basic' not found in wp-content/plugins/woo-shipperhq/includes/external/lib/jwt/src/Claim/GreaterOrEqualsTo.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\Rsa' not found in wp-content/plugins/woo-shipperhq/includes/external/lib/jwt/src/Signer/Rsa/Sha384.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Lcobucci\\JWT\\Claim' not found in wp-content/plugins/woo-shipperhq/includes/external/lib/jwt/src/Claim/Basic.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Lcobucci\\JWT\\Signer\\Ecdsa\\SignatureConverter' not found in wp-content/plugins/woo-shipperhq/includes/external/lib/jwt/src/Signer/Ecdsa/MultibyteStringConverter.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Claim\\Basic' not found in wp-content/plugins/woo-shipperhq/includes/external/lib/jwt/src/Claim/LesserOrEqualsTo.php:21
    • > PHP Notice
      Trying to get property 'lat' of non-object in wp-content/plugins/woo-shipperhq/includes/external/lib/jsonmapper/example/Address.php on line 17
    • > PHP Fatal error
      Uncaught Error: Interface 'ShipperHQ\\GraphQL\\Response\\ResponseInterface' not found in wp-content/plugins/woo-shipperhq/includes/external/lib/library-graphql/src/Response/CreateListing.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Magento\\Framework\\Component\\ComponentRegistrar' not found in wp-content/plugins/woo-shipperhq/includes/external/lib/library-graphql/src/registration.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
The official readme.txt is a good inspiration

woo-shipperhq/woocommerce-shipperhq.php 92% from 13 tests

The main file in "ShipperHQ for WooCommerce" v. 1.6.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-shipperhq.php" instead of "woocommerce-shipperhq.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 plugin12,220 lines of code in 214 files:
LanguageFilesBlank linesComment linesLines of code
PHP1892,6569,21010,898
Markdown92670441
JavaScript1131218268
reStructuredText2175155255
JSON610184
YAML4100123
XML21047
CSS12134

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.40
▷ Minimum class complexity1.00
▷ Maximum class complexity128.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces36
Interfaces10
Traits1
Classes168
▷ Abstract classes127.14%
▷ Concrete classes15692.86%
▷ Final classes53.21%
Methods1,266
▷ Static methods272.13%
▷ Public methods1,12388.70%
▷ Protected methods453.55%
▷ Private methods987.74%
Functions12
▷ Named functions216.67%
▷ Anonymous functions1083.33%
Constants41
▷ Global constants12.44%
▷ Class constants4097.56%
▷ Public constants40100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin