68% gel-proximity-for-woocommerce

Code Review | GEL Proximity | Aggregatore Punti di Ritiro e Locker

WordPress plugin GEL Proximity | Aggregatore Punti di Ritiro e Locker scored68%from 54 tests.

About plugin

  • Plugin page: gel-proximity-for...
  • Plugin version: 1.1.1.6
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Oct 5, 2021
  • Latest release: Apr 4, 2023
  • Number of updates: 47
  • Update frequency: every 11.7 days
  • Top authors: gelproximity (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,104 total downloads

Benchmarks

Plugin footprint 65% 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.00MB] [CPU: ▼3.39ms] Passed 4 tests

This is a short check of server-side resources used by GEL Proximity | Aggregatore Punti di Ritiro e Locker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.73 ▼1.07
Dashboard /wp-admin3.31 ▲0.0048.73 ▼4.21
Posts /wp-admin/edit.php3.36 ▲0.0044.68 ▼2.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.33 ▼5.38
Media Library /wp-admin/upload.php3.23 ▲0.0032.44 ▲0.12

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 73 new files
Database: 3 new tables, 8 new options
New tables
wp_gelprx_order_history
wp_gelprx_cart_price
wp_gelprx_return
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
GelProximity_Plugin__version
widget_theysaidso_widget
can_compress_scripts
GelProximity_Plugin__installed

Browser metrics Passed 4 tests

This is an overview of browser requirements for GEL Proximity | Aggregatore Punti di Ritiro e Locker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.17 ▼0.091.90 ▲0.2243.61 ▼4.18
Dashboard /wp-admin2,198 ▲215.61 ▲0.0784.73 ▼14.0040.70 ▼2.31
Posts /wp-admin/edit.php2,100 ▲31.99 ▲0.0334.13 ▼2.5432.19 ▼1.65
Add New Post /wp-admin/post-new.php1,535 ▲918.35 ▼4.67597.56 ▼106.9862.73 ▲13.50
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.0393.86 ▼9.5641.15 ▼1.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie tables were found after uninstall: 3 tables
    • wp_gelprx_cart_price
    • wp_gelprx_return
    • wp_gelprx_order_history
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • GelProximity_Plugin__version
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • GelProximity_Plugin__installed
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/gel-proximity-for-woocommerce/classes/GelProximityAdminReturnsManagerWpListTable.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'GelProximity_ShortCodeLoader' not found in wp-content/plugins/gel-proximity-for-woocommerce/classes/GelProximityReturnsManagerShortCode.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/gel-proximity-for-woocommerce/classes/GelProximityWCShippingMethod.php:3
    • > PHP Warning
      include_once(): Failed opening 'WP_PLUGIN_DIR/gel-proximity-for-woocommerce/GelProximity_ShortCodeLoader.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/gel-proximity-for-woocommerce/classes/GelProximityReturnsManagerShortCode.php on line 3
    • > PHP Warning
      include_once(WP_PLUGIN_DIR/gel-proximity-for-woocommerce/GelProximity_ShortCodeLoader.php): failed to open stream: No such file or directory in wp-content/plugins/gel-proximity-for-woocommerce/classes/GelProximityReturnsManagerShortCode.php on line 3
    • > PHP Warning
      include_once(WP_PLUGIN_DIR/gel-proximity-for-woocommerce/GelProximity_ShortCodeLoader.php): failed to open stream: No such file or directory in wp-content/plugins/gel-proximity-for-woocommerce/classes/GelProximityReturnsManagerShortCode.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gel-proximity-for-woocommerce/gel-proximity-for-woocommerce.php:82
    • > PHP Warning
      include_once(): Failed opening 'WP_PLUGIN_DIR/gel-proximity-for-woocommerce/GelProximity_ShortCodeLoader.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/gel-proximity-for-woocommerce/classes/GelProximityReturnsManagerShortCode.php on line 3
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/gel-proximity-for-woocommerce/classes/GelProximityReturnsManagerShortCode.php on line 3
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/gel-proximity-for-woocommerce/classes/GelProximityReturnsManagerShortCode.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'GelProximity_ShortCodeLoader' not found in wp-content/plugins/gel-proximity-for-woocommerce/classes/GelProximityReturnsManagerShortCode.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

gel-proximity-for-woocommerce/gel-proximity-for-woocommerce.php 85% from 13 tests

The primary PHP file in "GEL Proximity | Aggregatore Punti di Ritiro e Locker" version 1.1.1.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 240 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin5,414 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP339981,1874,022
PO File1128162324
CSS2602255
JavaScript32920239
HTML700201
Smarty500180
Markdown1440123
JSON30070

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity23.79
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes24
▷ Abstract classes28.33%
▷ Concrete classes2291.67%
▷ Final classes00.00%
Methods259
▷ Static methods5722.01%
▷ Public methods21482.63%
▷ Protected methods3011.58%
▷ Private methods155.79%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants35
▷ Global constants720.00%
▷ Class constants2880.00%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/gelproximity_logo_front.png52.87KB25.92KB▼ 50.96%
assets/img/gelproximity_logo.png21.02KB8.61KB▼ 59.05%
assets/img/gelprx_front_logo.png30.90KB15.30KB▼ 50.49%
assets/img/gelproximity_logo_admin.png23.12KB8.34KB▼ 63.93%
assets/img/gelproximity_logo_no_text_admin.png1.52KB1.15KB▼ 24.02%