84% gasolineras-de-espana

Code Review | Gasolineras de España

WordPress plugin Gasolineras de España scored84%from 54 tests.

About plugin

  • Plugin page: gasolineras-de-es...
  • Plugin version: 1.1.8
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.3
  • WordPress version: 6.3.1
  • First release: Mar 12, 2023
  • Latest release: Aug 17, 2023
  • Number of updates: 12
  • Update frequency: every 13.3 days
  • Top authors: hullcode (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /386 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Gasolineras de España
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0148.61 ▲2.39
Dashboard /wp-admin3.32 ▲0.0146.43 ▼6.32
Posts /wp-admin/edit.php3.37 ▲0.0145.50 ▼3.04
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.50 ▼12.22
Media Library /wp-admin/upload.php3.24 ▲0.0137.33 ▼0.39

Server storage [IO: ▲0.16MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_gdew_widget
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Gasolineras de España
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.40 ▲0.022.10 ▲0.1345.40 ▼1.28
Dashboard /wp-admin2,201 ▲245.60 ▼0.0887.66 ▼4.4239.73 ▼3.62
Posts /wp-admin/edit.php2,109 ▲92.04 ▲0.0433.96 ▼4.0835.21 ▲2.26
Add New Post /wp-admin/post-new.php1,541 ▲918.25 ▼5.22638.19 ▼64.5062.56 ▲6.92
Media Library /wp-admin/upload.php1,403 ▼04.24 ▲0.0794.82 ▲0.0143.19 ▼4.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_gdew_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/gasolineras-de-espana/gasolineras-de-espana.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 your attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in gasolineras-de-espana/assets to your readme.txt
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

gasolineras-de-espana/gasolineras-de-espana.php Passed 13 tests

The main PHP script in "Gasolineras de España" version 1.1.8 is automatically included on every request by WordPress
89 characters long description:
Widget that allows you to display gas stations in Spain and their prices on your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,022 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP112612405
JavaScript3990298
CSS2340187
PO File24852132

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity5.75
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
31 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/icons/agip.png4.17KB2.01KB▼ 51.94%
resources/icons/petrocat.png3.04KB1.77KB▼ 41.61%
resources/icons/petronor.png4.01KB1.88KB▼ 53.09%
resources/icons/bp.png3.47KB2.03KB▼ 41.44%
resources/icons/carrefour.png4.52KB1.90KB▼ 57.92%