84% via-delivery-us

Code Review | Via.Delivery: Shipping service for WooCommerce

WordPress plugin Via.Delivery: Shipping service for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: via-delivery-us
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.0
  • WordPress version: 6.3.1
  • First release: May 25, 2022
  • Latest release: Jun 17, 2022
  • Number of updates: 41
  • Update frequency: every 0.6 days
  • Top authors: viadelivery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /591 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Via.Delivery: Shipping service for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.78 ▼2.37
Dashboard /wp-admin3.31 ▲0.0142.87 ▼5.13
Posts /wp-admin/edit.php3.36 ▲0.0045.42 ▲0.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.43 ▲0.62
Media Library /wp-admin/upload.php3.23 ▲0.0032.91 ▼0.29

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Via.Delivery: Shipping service for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.26 ▼1.321.87 ▲0.3141.64 ▲0.98
Dashboard /wp-admin2,203 ▲115.82 ▲0.8993.43 ▼14.9337.93 ▼4.04
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0535.87 ▼2.3038.29 ▲6.42
Add New Post /wp-admin/post-new.php1,533 ▼022.94 ▼0.07650.68 ▼30.6751.51 ▲0.77
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0295.08 ▼13.5240.41 ▼4.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/via-delivery-us/views/backend/settings/tab-main.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Ipol\\Woo\\ViaDelivery\\Api\\Provider\\ProviderInterface' not found in wp-content/plugins/via-delivery-us/includes/api/provider/base.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/via-delivery-us/views/backend/dashboard/index.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function isCreated() on null in wp-content/plugins/via-delivery-us/views/backend/order/tab-map.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Ipol\\Woo\\ViaDelivery\\Api\\Provider\\Base' not found in wp-content/plugins/via-delivery-us/includes/api/provider/map.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Ipol\\Woo\\ViaDelivery\\Api\\Service\\ServiceInterface' not found in wp-content/plugins/via-delivery-us/includes/api/service/geocode.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/via-delivery-us/views/backend/settings/settings.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Ipol\\Woo\\ViaDelivery\\Controllers\\Base' not found in wp-content/plugins/via-delivery-us/includes/controllers/adminsettings.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Ipol\\Woo\\ViaDelivery\\Api\\Service\\ServiceInterface' not found in wp-content/plugins/via-delivery-us/includes/api/service/pointlist.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/via-delivery-us/views/backend/dashboard/dash-cities.php:32

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 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (/assets/screenshot/settings-en.png)
The official readme.txt is a good inspiration

via-delivery-us/via-delivery-us.php 92% from 13 tests

"Via.Delivery: Shipping service for WooCommerce" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin3,581 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP395987722,871
PO File2151277356
JavaScript26612276
SVG10142
CSS25036

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.71
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces9
Interfaces2
Traits0
Classes26
▷ Abstract classes27.69%
▷ Concrete classes2492.31%
▷ Final classes00.00%
Methods180
▷ Static methods6737.22%
▷ Public methods15586.11%
▷ Protected methods2212.22%
▷ Private methods31.67%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants10
▷ Global constants330.00%
▷ Class constants770.00%
▷ Public constants7100.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
4 PNG files occupy 0.32MB with 0.14MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/Close-icon.png0.41KB0.34KB▼ 17.22%
assets/screenshot/checkout-en.png219.05KB109.11KB▼ 50.19%
assets/screenshot/charts-en.png50.21KB22.21KB▼ 55.77%
assets/screenshot/settings-en.png54.94KB27.27KB▼ 50.36%