83% sendcloud-shipping

Code Review | Sendcloud | The all-in-one shipping platform for WooCommerce

WordPress plugin Sendcloud | The all-in-one shipping platform for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: sendcloud-shipping
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.9
  • WordPress version: 5.9.2
  • First release: Aug 24, 2016
  • Latest release: Mar 31, 2022
  • Number of updates: 65
  • Update frequency: every 31.5 days
  • Top authors: sendcloudbv (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

10,000+ active / 152,785 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Sendcloud | The all-in-one shipping platform for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0169.30 ▲1.36
Dashboard /wp-admin3.41 ▲0.0040.65 ▲0.99
Posts /wp-admin/edit.php3.64 ▲0.0044.58 ▼2.62
Add New Post /wp-admin/post-new.php6.88 ▼0.09103.50 ▼1,207.35
Media Library /wp-admin/upload.php3.29 ▲0.0042.22 ▲8.26
Sendcloud /wp-admin/admin.php?page=sendcloud-wc3.1032.14

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 224 new files
Database: 2 new tables, 1 new option
New tables
wp_sc_delivery_methods
wp_sc_delivery_zones
New WordPress options
SC_SCHEMA_VERSION

Browser metrics Passed 4 tests

Checking browser requirements for Sendcloud | The all-in-one shipping platform for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,789 ▲3515.70 ▲0.218.64 ▼0.702.62 ▼1.07
Dashboard /wp-admin2,918 ▲346.55 ▼0.06164.48 ▼12.70189.46 ▲1.16
Posts /wp-admin/edit.php2,688 ▼33.43 ▼0.0176.97 ▼4.65162.79 ▼17.20
Add New Post /wp-admin/post-new.php1,625 ▼6520.27 ▲0.09590.62 ▲33.91229.55 ▲31.23
Media Library /wp-admin/upload.php1,695 ▼05.67 ▼0.05224.70 ▲55.27314.14 ▲80.73
Sendcloud /wp-admin/admin.php?page=sendcloud-wc281.140.0422.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sendcloud-wc
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% 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
Please fix the following
  • 127× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'SendCloud\\Checkout\\Contracts\\Services\\CurrencyService' not found in wp-content/plugins/sendcloud-shipping/vendor/sendcloud/checkout/tests/Checkout/Validators/Mock/MockCurrencyService.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_formatted_address() on null in wp-content/plugins/sendcloud-shipping/resources/views/widgets/service-point-delivery/checkout/extend-admin-order-details.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'SendCloud\\Checkout\\Domain\\Interfaces\\DTOInstantiable' not found in wp-content/plugins/sendcloud-shipping/vendor/sendcloud/checkout/src/Domain/Delivery/DeliveryZone.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'SendCloud\\Checkout\\Contracts\\SchemaProviders\\SchemaProvider' not found in wp-content/plugins/sendcloud-shipping/vendor/sendcloud/checkout/src/SchemaProviders/CheckoutConfigurationSchemaProvider.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/sendcloud-shipping/resources/views/plugin/deactivation-notice.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'SendCloud\\Checkout\\Contracts\\Services\\DeliveryMethodService' not found in wp-content/plugins/sendcloud-shipping/vendor/sendcloud/checkout/src/Services/DeliveryMethodService.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'SendCloud\\Checkout\\Exceptions\\BaseException' not found in wp-content/plugins/sendcloud-shipping/vendor/sendcloud/checkout/src/Exceptions/Domain/FailedToDeleteCheckoutConfigurationException.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'SendCloud\\Checkout\\DTO\\DataTransferObject' not found in wp-content/plugins/sendcloud-shipping/vendor/sendcloud/checkout/src/API/Checkout/Delivery/Method/DeliveryMethod.php:13
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/sendcloud-shipping/resources/views/widgets/service-point-delivery/checkout/extend-admin-order-details.php on line 12
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/sendcloud-shipping/resources/views/widgets/mail/widget.php on line 12

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=sendcloud-wc
    • > Network (severe)
    wp-admin/admin.php?page=sendcloud-wc - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

sendcloud-shipping/sendcloud-shipping.php Passed 13 tests

The main PHP script in "Sendcloud | The all-in-one shipping platform for WooCommerce" version 2.2.1 is automatically included on every request by WordPress
17 characters long description:
Sendcloud plugin.

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
Success! There were no dangerous files found in this plugin14,528 lines of code in 208 files:
LanguageFilesBlank linesComment linesLines of code
PHP1852,3005,61310,030
JSON9502,784
PO File74906231,352
CSS1450216
JavaScript31910118
Markdown27015
XML10013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.91
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces67
Interfaces17
Traits0
Classes145
▷ Abstract classes85.52%
▷ Concrete classes13794.48%
▷ Final classes00.00%
Methods1,028
▷ Static methods868.37%
▷ Public methods91288.72%
▷ Protected methods484.67%
▷ Private methods686.61%
Functions21
▷ Named functions523.81%
▷ Anonymous functions1676.19%
Constants53
▷ Global constants00.00%
▷ Class constants53100.00%
▷ Public constants53100.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