79% offerte-gas-luce

Code Review | Offerte Gas Luce

WordPress plugin Offerte Gas Luce scored79%from 54 tests.

About plugin

  • Plugin page: offerte-gas-luce
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2021
  • Latest release: Nov 6, 2022
  • Number of updates: 9
  • Update frequency: every 65.8 days
  • Top authors: GioSensation (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /458 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.30ms] Passed 4 tests

Analyzing server-side resources used by Offerte Gas Luce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0736.34 ▼0.44
Dashboard /wp-admin3.37 ▲0.0744.91 ▼0.36
Posts /wp-admin/edit.php3.42 ▲0.0644.35 ▼2.52
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.06 ▼0.85
Media Library /wp-admin/upload.php3.29 ▲0.0631.92 ▼1.40

Server storage [IO: ▲0.06MB] [DB: ▲0.02MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
widget_offerte_gas_luce
offerte_gas_luce_data
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Offerte Gas Luce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.63 ▲0.351.67 ▲0.0339.45 ▼8.25
Dashboard /wp-admin2,198 ▲245.57 ▼0.0081.69 ▼6.4237.50 ▼4.47
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0134.10 ▼1.8435.71 ▼0.96
Add New Post /wp-admin/post-new.php1,528 ▼023.29 ▲0.10625.18 ▼56.2755.84 ▲2.24
Media Library /wp-admin/upload.php1,400 ▼04.17 ▲0.0196.69 ▼12.3740.91 ▼6.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_offerte_gas_luce
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/offerte-gas-luce/offerte-gas-luce.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/offerte-gas-luce/includes/widget.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: offerte gas e luce, bollette energia

offerte-gas-luce/offerte-gas-luce.php Passed 13 tests

The main file in "Offerte Gas Luce" v. 1.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
119 characters long description:
Aggiunge un widget che mostra le migliori offerte per l'energia di casa, gas e luce. Fonte: https://offertegasluce.com.

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 plugin226 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32127130
CSS14295
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin