78% ship-depot

Code Review | ShipDepot for WooCommerce

WordPress plugin ShipDepot for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: ship-depot
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.4.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 7, 2023
  • Latest release: Nov 7, 2023
  • Number of updates: 27
  • Update frequency: every 5.7 days
  • Top authors: shipdepot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲1.68MB] [CPU: ▲3.85ms] Passed 4 tests

An overview of server-side resources used by ShipDepot for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.82 ▲1.3648.93 ▲6.89
Dashboard /wp-admin5.34 ▲2.0466.57 ▲16.74
Posts /wp-admin/edit.php5.34 ▲1.9958.76 ▲9.86
Add New Post /wp-admin/post-new.php7.22 ▲1.3496.06 ▼12.45
Media Library /wp-admin/upload.php5.34 ▲2.1245.45 ▲11.11

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 106 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
sd_list_couriers
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ShipDepot for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7314.39 ▲0.222.23 ▲0.5642.63 ▼2.64
Dashboard /wp-admin2,218 ▲385.61 ▼0.0493.15 ▲2.0844.03 ▲1.05
Posts /wp-admin/edit.php2,121 ▲211.96 ▼0.0137.25 ▼0.7034.39 ▼4.20
Add New Post /wp-admin/post-new.php1,541 ▲1521.23 ▼1.97703.27 ▲29.6455.31 ▼8.13
Media Library /wp-admin/upload.php1,417 ▲204.21 ▲0.02100.04 ▼4.2842.89 ▼3.14

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • sd_list_couriers
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ship-depot/includes/class-admin-notices.php
  • 8× 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/ship-depot/page/frontend/sd-checkout-page.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Ship_Depot_Helper' not found in wp-content/plugins/ship-depot/includes/ShippingMethod/class-SHIPDEPOT-shipping-method.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ship-depot/page/admin/orders/sd-order-detail.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ship-depot/page/admin/settings/sd-about.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ship-depot/includes/ShippingStatus/class-extra-shipping-status.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ship-depot/includes/Address/address-ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ship-depot/page/frontend/sd-cart-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ship-depot/page/admin/orders/sd-order-list.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
5 plugin tags: aha, couriers, ghn, shipping, ghtk

ship-depot/Ship_Depot_init.php 85% from 13 tests

The principal PHP file in "ShipDepot for WooCommerce" v. 1.1.4 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ship-depot.php" instead of "Ship_Depot_init.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
There were no executable files found in this plugin11,100 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
PHP627587597,845
JavaScript102572352,215
CSS1020461774
PO File195106265
JSON1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity12.69
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes52
▷ Abstract classes00.00%
▷ Concrete classes52100.00%
▷ Final classes11.92%
Methods184
▷ Static methods5127.72%
▷ Public methods17595.11%
▷ Protected methods00.00%
▷ Private methods94.89%
Functions43
▷ Named functions4297.67%
▷ Anonymous functions12.33%
Constants24
▷ Global constants2187.50%
▷ Class constants312.50%
▷ Public constants3100.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
20 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/edit.png0.90KB0.55KB▼ 39.11%
assets/images/ic_delete.png0.51KB0.21KB▼ 58.02%
assets/images/ic_close_24px.png0.72KB0.31KB▼ 57.28%
assets/images/ic_close_12px.png0.22KB0.21KB0.45%
assets/images/copy.png0.59KB0.27KB▼ 54.64%