10% official-sendle-shipping-method

Code Review | Sendle Shipping Plugin

WordPress plugin Sendle Shipping Plugin scored10%from 54 tests.

About plugin

  • Plugin page: official-sendle-s...
  • Plugin version: 5.16
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 18, 2019
  • Latest release: Nov 8, 2023
  • Number of updates: 104
  • Update frequency: every 16.1 days
  • Top authors: joovii (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /41,992 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/official-sendle-shipping-method/sendle-shipment-booking.php+558
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.38MB] [CPU: ▼52.69ms] Passed 4 tests

Analyzing server-side resources used by Sendle Shipping Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.62 ▼0.848.06 ▼35.01
Dashboard /wp-admin2.64 ▼0.7110.95 ▼51.30
Posts /wp-admin/edit.php2.64 ▼0.7211.00 ▼37.88
Add New Post /wp-admin/post-new.php2.64 ▼3.2511.66 ▼86.57
Media Library /wp-admin/upload.php2.64 ▼0.598.64 ▼23.66
Cancel Sendle Order /wp-admin/admin.php?page=cancel-sendle2.649.85
Track Shipment /wp-admin/admin.php?page=track-shipment2.649.54
Sendle Email Template /wp-admin/admin.php?page=ossm_sendle_trackingemailtemplate2.649.72
Download Shipping Label /wp-admin/admin.php?page=download-shipping-label2.6410.11
Sendle Settings /wp-admin/admin.php?page=wc-settings&tab=shipping§ion=ossmsendle2.648.95
Create Sendle Shipment /wp-admin/admin.php?page=create-shipment2.6410.04
View Sendle Order Details /wp-admin/admin.php?page=viewdetails-sendle2.6410.05
Validate Sendle /wp-admin/admin.php?page=ossm_validate_sendle2.6410.47

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 19 new files
Database: 1 new table, 7 new options
New tables
wp_sendlelogs
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
recovery_mode_email_last_sent
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sendle Shipping Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4814.30 ▼0.411.71 ▼0.1340.23 ▼3.68
Dashboard /wp-admin2,201 ▲245.62 ▼0.0295.17 ▼6.9242.02 ▼8.75
Posts /wp-admin/edit.php2,103 ▼01.98 ▲0.0341.01 ▲3.8437.14 ▲0.47
Add New Post /wp-admin/post-new.php1,529 ▲322.99 ▲0.08636.18 ▼49.2154.85 ▼9.52
Media Library /wp-admin/upload.php1,403 ▲34.11 ▼0.08101.37 ▼3.1940.75 ▼2.41
Cancel Sendle Order /wp-admin/admin.php?page=cancel-sendle6831.126.8222.74
Track Shipment /wp-admin/admin.php?page=track-shipment7962.0023.9423.63
Sendle Email Template /wp-admin/admin.php?page=ossm_sendle_trackingemailtemplate8452.1126.5226.10
Download Shipping Label /wp-admin/admin.php?page=download-shipping-label7781.9921.2924.78
Sendle Settings /wp-admin/admin.php?page=wc-settings&tab=shipping§ion=ossmsendle280.410.113.53
Create Sendle Shipment /wp-admin/admin.php?page=create-shipment7641.9924.0524.34
View Sendle Order Details /wp-admin/admin.php?page=viewdetails-sendle7612.0024.0523.45
Validate Sendle /wp-admin/admin.php?page=ossm_validate_sendle6801.516.6115.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/official-sendle-shipping-method/sendle-shipment-booking.php+558
    Trying to access array offset on value of type bool
  • Zombie tables detected upon uninstall: 1 table
    • wp_sendlelogs
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • recovery_mode_email_last_sent

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 87 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ossm_validate_sendle
    • > Notice in wp-content/plugins/official-sendle-shipping-method/validate-sendle.php+21
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=cancel-sendle
    • > Notice in wp-content/plugins/official-sendle-shipping-method/cancel-shipment.php+47
    Undefined index: sendle_order_id
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=viewdetails-sendle
    • > Notice in wp-content/plugins/official-sendle-shipping-method/sendle-shipping-function.php+793
    Undefined index: oid
    • > GET request to /wp-admin/admin.php?page=cancel-sendle
    • > Error in wp-content/plugins/official-sendle-shipping-method/cancel-shipment.php+49
    Uncaught Error: Class 'WC_Order' not found in wp-content/plugins/official-sendle-shipping-method/cancel-shipment.php:49
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): ossm_cancel_sendle()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=track-shipment
    • > Notice in wp-content/plugins/official-sendle-shipping-method/track-shipment.php+12
    Undefined index: sendle_reference
    • > GET request to /wp-admin/admin.php?page=track-shipment
    • > Notice in wp-content/plugins/official-sendle-shipping-method/track-shipment.php+49
    Undefined index: state
    • > GET request to /wp-admin/admin.php?page=download-shipping-label
    • > Notice in wp-content/plugins/official-sendle-shipping-method/download-label.php+8
    Undefined index: pdfdlink
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=viewdetails-sendle
    • > Notice in wp-content/plugins/official-sendle-shipping-method/sendle-shipping-function.php+809
    Undefined variable: sendle_order_id
    • > GET request to /wp-admin/admin.php?page=ossm_validate_sendle
    • > Error in wp-content/plugins/official-sendle-shipping-method/validate-sendle.php+52
    Uncaught Error: Class 'WC_Countries' not found in wp-content/plugins/official-sendle-shipping-method/validate-sendle.php:52
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): ossm_validate_sendle()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/official-sendle-shipping-method/sendle-admin-feature.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/official-sendle-shipping-method/sendle-logs.php on line 56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/official-sendle-shipping-method/sendle-shipping-global.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/official-sendle-shipping-method/joovii-sendle-shipping.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/official-sendle-shipping-method/sendle-shipping-zone.php:193
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/official-sendle-shipping-method/cancel-shipment.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/official-sendle-shipping-method/sendle-logs.php on line 56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/official-sendle-shipping-method/sendle-shipment-booking.php:557
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/official-sendle-shipping-method/frontend-tracking.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/official-sendle-shipping-method/sendle-widget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=wc-settings&tab=shipping§ion=ossmsendle
    • > Network (severe)
    wp-admin/admin.php?page=wc-settings&tab=shipping&section=ossmsendle - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 86% 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:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === official-sendle-shipping-method === )
You can look at the official readme.txt

official-sendle-shipping-method/joovii-sendle-shipping.php 77% from 13 tests

The entry point to "Sendle Shipping Plugin" version 5.16 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/lang")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("official-sendle-shipping-method.php" instead of "joovii-sendle-shipping.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,975 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP154351782,944
JavaScript10021
CSS10010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity11.60
▷ Minimum class complexity4.00
▷ Maximum class complexity32.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions66
▷ Named functions66100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin