83% shipping-for-wolt-drive-woocommerce

Code Review | Wolt drive for WooCommerce

WordPress plugin Wolt drive for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: shipping-for-wolt...
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.2-6.2
  • WordPress version: 6.3.1
  • First release: Mar 23, 2023
  • Latest release: Jun 26, 2023
  • Number of updates: 13
  • Update frequency: every 7.3 days
  • Top authors: networkmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /309 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.01MB] [CPU: ▼8.58ms] Passed 4 tests

A check of server-side resources used by Wolt drive for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.59 ▼7.41
Dashboard /wp-admin3.31 ▲0.0143.72 ▼11.17
Posts /wp-admin/edit.php3.36 ▲0.0148.20 ▼0.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.25 ▼14.77
Media Library /wp-admin/upload.php3.23 ▲0.0035.60 ▲2.81

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Wolt drive for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.56 ▼0.791.69 ▼0.0142.32 ▼2.20
Dashboard /wp-admin2,203 ▲244.90 ▼1.01103.17 ▼13.7142.97 ▼8.56
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0339.03 ▲3.5335.28 ▼1.22
Add New Post /wp-admin/post-new.php1,536 ▲123.32 ▲0.13653.00 ▼6.6152.94 ▲1.45
Media Library /wp-admin/upload.php1,388 ▼34.25 ▼0.0296.40 ▼1.9343.52 ▼0.58

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shipping-for-wolt-drive-woocommerce/library/wcws_output_functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shipping-for-wolt-drive-woocommerce/library/wcws_promises_functions.php:75

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

shipping-for-wolt-drive-woocommerce/woocommerce_wolt_shipping.php 85% from 13 tests

Analyzing the main PHP file in "Wolt drive for WooCommerce" version 1.0.6
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.9" instead of "4.5.2")
  • Main file name: Name the main plugin file the same as the plugin slug ("shipping-for-wolt-drive-woocommerce.php" instead of "woocommerce_wolt_shipping.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,380 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP8238147884
SVG600288
PO File16876192
CSS12016

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity30.00
▷ Minimum class complexity27.00
▷ Maximum class complexity33.00
Average method complexity6.80
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin