78% eventi-asiago-it

Code Review | Eventi Asiago.it

WordPress plugin Eventi Asiago.it scored78%from 54 tests.

About plugin

  • Plugin page: eventi-asiago-it
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-5.2.4
  • WordPress version: 6.3.1
  • First release: May 19, 2017
  • Latest release: Nov 5, 2019
  • Number of updates: 12
  • Update frequency: every 75.0 days
  • Top authors: wcmatteo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /780 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.78ms] Passed 4 tests

An overview of server-side resources used by Eventi Asiago.it
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.59 ▼7.51
Dashboard /wp-admin3.35 ▲0.0548.74 ▼1.30
Posts /wp-admin/edit.php3.40 ▲0.0545.69 ▼5.37
Add New Post /wp-admin/post-new.php5.93 ▲0.0594.01 ▼4.95
Media Library /wp-admin/upload.php3.27 ▲0.0537.82 ▼0.61
Eventi Asiago.it /wp-admin/options-general.php?page=webcloud-asiago-events3.2432.69

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_webcloud_asiago_events_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Eventi Asiago.it
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.70 ▼0.601.69 ▼0.5142.58 ▼2.40
Dashboard /wp-admin2,210 ▲254.79 ▼1.23107.82 ▲2.5142.44 ▲4.61
Posts /wp-admin/edit.php2,093 ▲12.08 ▲0.0837.10 ▼3.4238.24 ▼1.11
Add New Post /wp-admin/post-new.php1,536 ▲323.19 ▲0.19676.75 ▲41.1363.59 ▲8.57
Media Library /wp-admin/upload.php1,392 ▲74.23 ▲0.0697.93 ▼9.6246.34 ▲1.25
Eventi Asiago.it /wp-admin/options-general.php?page=webcloud-asiago-events7782.0623.3326.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_webcloud_asiago_events_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/eventi-asiago-it/views/events.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Webcloud\\AsiagoEvents\\add_shortcode() in wp-content/plugins/eventi-asiago-it/webcloud-asiago-events.php:42
    • > PHP Notice
      Undefined variable: events in wp-content/plugins/eventi-asiago-it/views/events.php on line 156
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/eventi-asiago-it/views/events.php on line 156

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
No tags were found

eventi-asiago-it/webcloud-asiago-events.php 92% from 13 tests

This is the main PHP file of "Eventi Asiago.it" version 1.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("eventi-asiago-it.php" instead of "webcloud-asiago-events.php")

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
There were no executable files found in this plugin305 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25667305

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity4.50
▷ Minimum class complexity4.00
▷ Maximum class complexity5.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin