77% delivengo

Code Review | Delivengo: Shipping methods for WooCommerce

WordPress plugin Delivengo: Shipping methods for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: delivengo
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 14, 2023
  • Latest release: Nov 13, 2023
  • Number of updates: 4
  • Update frequency: every 39.3 days
  • Top authors: delivengo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /204 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.21ms] Passed 4 tests

An overview of server-side resources used by Delivengo: Shipping methods for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.73 ▼0.89
Dashboard /wp-admin3.32 ▲0.0149.19 ▼6.76
Posts /wp-admin/edit.php3.37 ▲0.0146.52 ▲0.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.69 ▼6.87
Media Library /wp-admin/upload.php3.24 ▲0.0132.73 ▼2.31

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 234 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Delivengo: Shipping methods for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.26 ▼0.451.85 ▲0.1546.77 ▲3.54
Dashboard /wp-admin2,195 ▲155.60 ▲0.0586.18 ▼9.0437.08 ▼8.03
Posts /wp-admin/edit.php2,103 ▲31.98 ▲0.0440.16 ▼0.8334.59 ▼6.93
Add New Post /wp-admin/post-new.php1,526 ▼023.31 ▲0.42676.14 ▲49.7556.58 ▲1.93
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.0596.81 ▼8.2640.95 ▼2.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/delivengo/delivengo.php
    • > /wp-content/plugins/delivengo/vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php
  • 103× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Delivengo\\Classes\\Shipping\\ShippingMethod' not found in wp-content/plugins/delivengo/src/Classes/Shipping/ShippingMethodTracked.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/delivengo/src/Partials/Orders/Tracking.php:3
    • > PHP Fatal error
      require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/delivengo/vendor/setasign/fpdi/local-tests/simple-v1.php on line 6
    • > PHP Warning
      require_once(../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/delivengo/vendor/setasign/fpdi/local-tests/memory.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\Tcpdf\\Fpdi' not found in wp-content/plugins/delivengo/vendor/setasign/fpdi/src/TcpdfFpdi.php:20
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/delivengo/src/Partials/ShippingMethods/RatesTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\CrossReference\\AbstractReader' not found in wp-content/plugins/delivengo/vendor/setasign/fpdi/src/PdfParser/CrossReference/LineReader.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/delivengo/vendor/setasign/fpdi/src/PdfParser/Type/PdfHexString.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/delivengo/src/Partials/Settings/Logs.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Delivengo\\Services\\Api\\Api' not found in wp-content/plugins/delivengo/src/Services/Api/ApiEasy.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
3 plugin tags: delivengo, shipping, woocommerce

delivengo/delivengo.php 85% from 13 tests

"Delivengo: Shipping methods for WooCommerce" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.4.0" instead of "7.4")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin61,343 lines of code in 216 files:
LanguageFilesBlank linesComment linesLines of code
PHP1773,85914,88158,029
PO File261601,236
JSON1200847
JavaScript91112601
CSS9500230
Markdown3490171
Bourne Shell12213163
XML25240
SQL11026

PHP code 0% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 4,415)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 500)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity63.89
▷ Minimum class complexity1.00
▷ Maximum class complexity4,415.00
Average method complexity7.32
▷ Minimum method complexity1.00
▷ Maximum method complexity500.00
Code structure
Namespaces27
Interfaces2
Traits2
Classes119
▷ Abstract classes32.52%
▷ Concrete classes11697.48%
▷ Final classes00.00%
Methods1,228
▷ Static methods19816.12%
▷ Public methods85369.46%
▷ Protected methods33227.04%
▷ Private methods433.50%
Functions36
▷ Named functions513.89%
▷ Anonymous functions3186.11%
Constants237
▷ Global constants11448.10%
▷ Class constants12351.90%
▷ Public constants123100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo_laposte.png8.27KB2.35KB▼ 71.60%
assets/images/logo.png3.66KB3.70KB0.00%