84% wc-shipos-delivery

Code Review | Deliver via Shipos for WooCommerce

WordPress plugin Deliver via Shipos for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-shipos-delivery
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 30, 2023
  • Latest release: Nov 21, 2023
  • Number of updates: 27
  • Update frequency: every 8.7 days
  • Top authors: amitrotem (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /1,425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.25ms] Passed 4 tests

A check of server-side resources used by Deliver via Shipos for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.90 ▼2.52
Dashboard /wp-admin3.40 ▲0.0947.85 ▼3.21
Posts /wp-admin/edit.php3.51 ▲0.1551.90 ▲2.55
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.78 ▼12.97
Media Library /wp-admin/upload.php3.32 ▲0.0932.91 ▼2.31

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 125 new files
Database: no new tables, 8 new options
New WordPress options
dvsfw_install_date
can_compress_scripts
dvsfw_dev_mode
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Deliver via Shipos for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7414.67 ▲0.342.01 ▲0.2138.84 ▼3.29
Dashboard /wp-admin2,201 ▲215.60 ▼0.0493.55 ▼3.7444.13 ▼1.87
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0136.04 ▼1.1433.51 ▲0.68
Add New Post /wp-admin/post-new.php1,532 ▲623.56 ▲0.40683.90 ▲37.1855.37 ▲1.51
Media Library /wp-admin/upload.php1,409 ▲64.18 ▼0.0196.70 ▲0.5944.78 ▲1.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • dvsfw_dev_mode
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • dvsfw_install_date

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 3× 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/wc-shipos-delivery/includes/Pickup.php:89
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WCShiposDelivery\\add_filter() in wp-content/plugins/wc-shipos-delivery/class/class-settings.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-shipos-delivery/includes/matat-actions.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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
Attributes that require attention: The official readme.txt might help

wc-shipos-delivery/wc-shipos-delivery.php Passed 13 tests

Analyzing the main PHP file in "Deliver via Shipos for WooCommerce" version 1.1.4
61 characters long description:
A plugin for Ship os Delivery orders from within WooCommerce.

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
Everything looks great! No dangerous files found in this plugin19,420 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript72671,85610,925
Sass871,4171,1885,870
PHP123383201,535
CSS51420792
PO File1116128265
JSON10029
SVG4004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity13.75
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods50
▷ Static methods1020.00%
▷ Public methods4488.00%
▷ Protected methods00.00%
▷ Private methods612.00%
Functions25
▷ Named functions2392.00%
▷ Anonymous functions28.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/matatlogo.png29.80KB10.57KB▼ 64.53%