78% gelato-integration-for-woocommerce

Code Review | Gelato Integration for WooCommerce

WordPress plugin Gelato Integration for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: gelato-integratio...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Aug 13, 2021
  • Latest release: Aug 4, 2023
  • Number of updates: 33
  • Update frequency: every 22.3 days
  • Top authors: gelatoapi (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

3,000+ active /24,306 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

A check of server-side resources used by Gelato Integration for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.32 ▼5.75
Dashboard /wp-admin3.31 ▲0.0149.91 ▼4.02
Posts /wp-admin/edit.php3.36 ▲0.0149.29 ▼2.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.43 ▲3.76
Media Library /wp-admin/upload.php3.23 ▲0.0137.43 ▼1.55

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Gelato Integration for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.371.69 ▼0.4643.69 ▲0.53
Dashboard /wp-admin2,195 ▲245.62 ▲0.0192.96 ▼8.9044.10 ▼0.18
Posts /wp-admin/edit.php2,097 ▼02.03 ▲0.0739.92 ▲1.7435.43 ▼2.11
Add New Post /wp-admin/post-new.php1,526 ▼023.26 ▲0.17671.21 ▲25.4561.20 ▲10.64
Media Library /wp-admin/upload.php1,397 ▼64.19 ▲0.03100.41 ▼0.3240.63 ▼6.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gelato-integration-for-woocommerce/templates/header.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: is_connected in wp-content/plugins/gelato-integration-for-woocommerce/templates/main.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gelato-integration-for-woocommerce/templates/status.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/gelato-integration-for-woocommerce/templates/main.php:60
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/gelato-integration-for-woocommerce/templates/header.php on line 6
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/gelato-integration-for-woocommerce/templates/header.php on line 6

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

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Plugin home page), #2 (Gelato shipping page)
The official readme.txt is a good inspiration

gelato-integration-for-woocommerce/gelato-integration-for-woocommerce.php Passed 13 tests

The entry point to "Gelato Integration for WooCommerce" version 1.2.1 is a PHP file that has certain tags in its header comment area
65 characters long description:
This plugin helps to connect your WooCommerce store with Gelato .

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
Success! There were no dangerous files found in this plugin1,133 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP14191991,089
CSS16033
SVG10111

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.55
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods58
▷ Static methods1118.97%
▷ Public methods4475.86%
▷ Protected methods11.72%
▷ Private methods1322.41%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants26
▷ Global constants311.54%
▷ Class constants2388.46%
▷ Public constants2295.65%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/woocommerce-banner.png23.97KB9.38KB▼ 60.86%