83% shipworks-e-commerce-bridge

Code Review | ShipWorks Connector for Woocommerce

WordPress plugin ShipWorks Connector for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: shipworks-e-comme...
  • Plugin version: 5.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 28, 2013
  • Latest release: Oct 4, 2023
  • Number of updates: 346
  • Update frequency: every 10.7 days
  • Top authors: AdvancedCreation (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

400+ active /34,471 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▲378.57ms] 50% from 4 tests

Analyzing server-side resources used by ShipWorks Connector for Woocommerce
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 554.18ms on /wp-admin/admin.php?page=shipworks-wordpress)
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 378.57ms on /wp-admin/admin.php?page=shipworks-wordpress)
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.44 ▼0.41
Dashboard /wp-admin3.43 ▲0.13547.68 ▲495.35
Posts /wp-admin/edit.php3.48 ▲0.13566.29 ▲512.44
Add New Post /wp-admin/post-new.php5.95 ▲0.06614.86 ▲513.15
Media Library /wp-admin/upload.php3.29 ▲0.06545.20 ▲506.88
Options /wp-admin/admin.php?page=options3.29580.53
Set Up /wp-admin/admin.php?page=set-up3.27536.42
Subscription /wp-admin/admin.php?page=subscription3.26530.18
Shipworks WP /wp-admin/admin.php?page=shipworks-wordpress3.30554.18

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 66 new files
Database: no new tables, 15 new options
New WordPress options
widget_theysaidso_widget
adv_password
show_private_message_shipAdv
admin_notes_restriction_shipAdv
theysaidso_admin_options
show_coupon_shipAdv
adv_username
show_variationId_shipAdv
can_compress_scripts
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by ShipWorks Connector for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲4614.37 ▲0.011.59 ▼0.5246.66 ▲2.51
Dashboard /wp-admin2,226 ▲525.55 ▼0.0787.13 ▼6.7977.17 ▲30.34
Posts /wp-admin/edit.php2,147 ▲471.99 ▼0.0135.93 ▼3.0535.83 ▼2.36
Add New Post /wp-admin/post-new.php1,578 ▲4722.95 ▼0.14760.81 ▲51.0257.62 ▲4.38
Media Library /wp-admin/upload.php1,443 ▲434.22 ▲0.03104.57 ▼3.4384.22 ▲37.94
Options /wp-admin/admin.php?page=options9631.7925.5964.94
Set Up /wp-admin/admin.php?page=set-up8721.9925.2427.68
Subscription /wp-admin/admin.php?page=subscription8312.0026.8328.36
Shipworks WP /wp-admin/admin.php?page=shipworks-wordpress8932.0022.6730.73

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 15 options
    • show_coupon_shipAdv
    • show_variationId_shipAdv
    • can_compress_scripts
    • show_private_message_shipAdv
    • theysaidso_admin_options
    • woocommerce_api_shipAdv
    • widget_recent-posts
    • show_customer_message_shipAdv
    • widget_recent-comments
    • adv_password
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=subscription
    • > Javascript (severe) in unknown
    /wp-content/plugins/shipworks-e-commerce-bridge/css/bootstrap.min.js?ver=6.3.1 10:215 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
10 plugin tags: order manager, shipping manager, woocommerce sequential order numbers, shipment tracking, shipping...

shipworks-e-commerce-bridge/controler.php 77% from 13 tests

The main PHP file in "ShipWorks Connector for Woocommerce" ver. 5.0.8 adds more information about the plugin and also serves as the entry point for this 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 ("shipworks-e-commerce-bridge.php" instead of "controler.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "2.0")

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 plugin5,683 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP471,5181644,826
PO File2212226831
CSS2241424
JavaScript1192

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity32.64
▷ Minimum class complexity4.00
▷ Maximum class complexity129.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods197
▷ Static methods00.00%
▷ Public methods13870.05%
▷ Protected methods5929.95%
▷ Private methods00.00%
Functions84
▷ Named functions8398.81%
▷ Anonymous functions11.19%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo.png1.58KB0.73KB▼ 54.19%
img/icon.png1.58KB0.73KB▼ 54.19%