84% woo-esto

Code Review | Woocommerce ESTO

WordPress plugin Woocommerce ESTO scored84%from 54 tests.

About plugin

  • Plugin page: woo-esto
  • Plugin version: 2.24.2
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 15, 2018
  • Latest release: Nov 24, 2023
  • Number of updates: 169
  • Update frequency: every 12.3 days
  • Top authors: rebing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /15,318 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Woocommerce ESTO
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0234.82 ▼7.71
Dashboard /wp-admin3.33 ▼0.0251.34 ▼10.69
Posts /wp-admin/edit.php3.39 ▲0.0248.83 ▲1.17
Add New Post /wp-admin/post-new.php5.92 ▲0.0286.91 ▼13.22
Media Library /wp-admin/upload.php3.26 ▲0.0238.44 ▲1.52

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 92 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce ESTO
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲1814.34 ▼0.361.53 ▼0.3837.74 ▼5.61
Dashboard /wp-admin2,198 ▲215.59 ▼0.0689.91 ▼8.5641.61 ▼2.09
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0237.17 ▼3.7132.31 ▼3.32
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▲0.02678.38 ▲21.2352.86 ▲0.25
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.01100.39 ▲2.1046.00 ▲3.43

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • 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)
Even though no errors were found, this is by no means an exhaustive test

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
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Esto_Payment' not found in wp-content/plugins/woo-esto/includes/class-wc-esto-pay-later-payment.php:2
    • > PHP Notice
      Undefined variable: show_esto_3 in wp-content/plugins/woo-esto/assets/view/calculator.php on line 6
    • > PHP Notice
      Undefined variable: calc_text in wp-content/plugins/woo-esto/assets/view/calculator-archive.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Esto_Payment' not found in wp-content/plugins/woo-esto/includes/class-wc-esto-pay-payment.php:2
    • > PHP Notice
      Undefined variable: calc_text in wp-content/plugins/woo-esto/assets/view/calculator.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Esto_Payment' not found in wp-content/plugins/woo-esto/includes/class-wc-esto-x-payment.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-esto/includes/Payment.php:984
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-esto/assets/view/calculator.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-esto/includes/Payment.php:984
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Esto_Payment' not found in wp-content/plugins/woo-esto/includes/class-wc-pay-later-payment.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
No tags were detected

woo-esto/esto-payment.php 92% from 13 tests

The entry point to "Woocommerce ESTO" version 2.24.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-esto.php" instead of "esto-payment.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin5,901 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP155613812,656
PO File56259861,623
SVG200161,442
CSS4200148
JavaScript33032

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity34.30
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods96
▷ Static methods33.12%
▷ Public methods7881.25%
▷ Protected methods1616.67%
▷ Private methods22.08%
Functions16
▷ Named functions1381.25%
▷ Anonymous functions318.75%
Constants13
▷ Global constants323.08%
▷ Class constants1076.92%
▷ Public constants10100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
39 PNG files occupy 0.60MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/bank-logos/medicinos.png34.63KB7.53KB▼ 78.27%
assets/images/icons/ESTO3EE.png8.07KB4.92KB▼ 38.97%
assets/images/bank-logos/industra.png33.25KB11.34KB▼ 65.90%
assets/images/bank-logos/pop_pankki.png24.31KB5.36KB▼ 77.95%
assets/images/icons/ESTO3LV.png7.86KB4.84KB▼ 38.44%