83% samedaycourier-shipping

Code Review | SamedayCourier Shipping

WordPress plugin SamedayCourier Shipping scored83%from 54 tests.

About plugin

  • Plugin page: samedaycourier-sh...
  • Plugin version: 1.7.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 17, 2019
  • Latest release: Nov 1, 2023
  • Number of updates: 112
  • Update frequency: every 14.6 days
  • Top authors: samedaycourier (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /40,971 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.58ms] Passed 4 tests

An overview of server-side resources used by SamedayCourier Shipping
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.04 ▲1.04
Dashboard /wp-admin3.31 ▲0.0045.91 ▼5.83
Posts /wp-admin/edit.php3.36 ▲0.0050.05 ▼1.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.60 ▼6.68
Media Library /wp-admin/upload.php3.23 ▲0.0034.49 ▼0.68

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

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

Browser metrics Passed 4 tests

SamedayCourier Shipping: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.42 ▼0.191.96 ▼0.1545.55 ▼0.34
Dashboard /wp-admin2,195 ▲215.57 ▲0.0493.74 ▼2.5347.30 ▲2.20
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0642.14 ▲5.4635.77 ▲1.32
Add New Post /wp-admin/post-new.php1,526 ▼223.01 ▼0.08602.87 ▼91.5648.27 ▼9.28
Media Library /wp-admin/upload.php1,403 ▲94.21 ▲0.02101.21 ▼2.0943.62 ▼0.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 65× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Sameday\\HttpClients\\SamedayHttpClientInterface' not found in wp-content/plugins/samedaycourier-shipping/lib/sameday-courier/src/Sameday/HttpClients/SamedayStreamHttpClient.php:13
    • > PHP Fatal error
      Trait 'Sameday\\Objects\\Traits\\SamedayObjectIdTrait' not found in wp-content/plugins/samedaycourier-shipping/lib/sameday-courier/src/Sameday/Objects/Service/DeliveryTypeObject.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'Sameday\\Objects\\PostAwb\\Request\\EntityObject' not found in wp-content/plugins/samedaycourier-shipping/lib/sameday-courier/src/Sameday/Objects/PostAwb/Request/ThirdPartyPickupEntityObject.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Sameday\\Requests\\SamedayRequestInterface' not found in wp-content/plugins/samedaycourier-shipping/lib/sameday-courier/src/Sameday/Requests/SamedayDeleteAwbRequest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Sameday\\Objects\\AwbStatusHistory\\HistoryObject' not found in wp-content/plugins/samedaycourier-shipping/lib/sameday-courier/src/Sameday/Objects/AwbStatusHistory/ParcelObject.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Sameday\\Responses\\SamedayResponseInterface' not found in wp-content/plugins/samedaycourier-shipping/lib/sameday-courier/src/Sameday/Responses/SamedayPutParcelSizeResponse.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Sameday\\Responses\\SamedayResponseInterface' not found in wp-content/plugins/samedaycourier-shipping/lib/sameday-courier/src/Sameday/Responses/SamedayPaginatedResponseInterface.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Sameday\\Responses\\SamedayResponseInterface' not found in wp-content/plugins/samedaycourier-shipping/lib/sameday-courier/src/Sameday/Responses/SamedayPutAwbCODAmountResponse.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Sameday\\Exceptions\\SamedayServerException' not found in wp-content/plugins/samedaycourier-shipping/lib/sameday-courier/src/Sameday/Exceptions/SamedayAuthorizationException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Sameday\\Objects\\PostAwb\\Request\\EntityObject' not found in wp-content/plugins/samedaycourier-shipping/lib/sameday-courier/src/Sameday/Objects/PostAwb/Request/AwbRecipientEntityObject.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: shipping

samedaycourier-shipping/samedaycourier-shipping.php 85% from 13 tests

The entry point to "SamedayCourier Shipping" version 1.7.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/ro")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin8,335 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
PHP1181,8004,0387,481
PO File1127140307
JavaScript45727277
CSS197134
Markdown325098
JSON10038

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.82
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity1.49
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces20
Interfaces8
Traits6
Classes98
▷ Abstract classes00.00%
▷ Concrete classes98100.00%
▷ Final classes00.00%
Methods587
▷ Static methods7512.78%
▷ Public methods56195.57%
▷ Protected methods40.68%
▷ Private methods223.75%
Functions52
▷ Named functions1834.62%
▷ Anonymous functions3465.38%
Constants45
▷ Global constants00.00%
▷ Class constants45100.00%
▷ Public constants3782.22%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
31 PNG files occupy 0.86MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-6.png28.16KB14.13KB▼ 49.81%
icon.png22.89KB7.68KB▼ 66.45%
assets/screenshots/samedaycourier-settings.PNG34.41KB16.74KB▼ 51.36%
assets/screenshots/samedaycourier-generate-awb-form.PNG41.13KB19.54KB▼ 52.50%
assets/screenshots/screenshot-3.png12.13KB5.87KB▼ 51.62%