10% prenotazioni

Code Review | Prenotazioni

WordPress plugin Prenotazioni scored10%from 54 tests.

About plugin

  • Plugin page: prenotazioni
  • Plugin version: 1.7.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Apr 26, 2014
  • Latest release: May 21, 2023
  • Number of updates: 40
  • Update frequency: every 82.9 days
  • Top authors: Ignazios (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /13,240 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/prenotazioni/functions.inc.php+106
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

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

Analyzing server-side resources used by Prenotazioni
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.57 ▲2.60
Dashboard /wp-admin3.38 ▲0.0353.59 ▼9.33
Posts /wp-admin/edit.php3.33 ▼0.0338.82 ▼14.23
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.02 ▼10.46
Media Library /wp-admin/upload.php3.30 ▲0.0744.73 ▲8.57
Bacheca /wp-admin/admin.php?page=bacheca3.2733.97
Gestione Prenotazioni /wp-admin/admin.php?page=gest_prenotazioni3.2634.27
Mie Prenotazioni /wp-admin/admin.php?page=myprenotazioni3.2734.81
Parametri /wp-admin/admin.php?page=config3.2837.00
Spazi /wp-admin/edit.php?post_type=spazi3.3540.01

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 55 new files
Database: 1 new table, 9 new options
New tables
wp_prenotazioni_spazi
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
opt_PrenotazioniMail
opt_PrenotazioniParametri
widget_prenotazioni

Browser metrics Passed 4 tests

An overview of browser requirements for Prenotazioni
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,023 ▲27714.57 ▲0.359.46 ▲7.4139.09 ▼6.76
Dashboard /wp-admin2,296 ▲955.46 ▲0.54103.87 ▼9.4591.61 ▲44.44
Posts /wp-admin/edit.php2,196 ▲932.42 ▲0.3949.05 ▲8.0734.89 ▼4.10
Add New Post /wp-admin/post-new.php1,763 ▲23123.53 ▲0.26800.34 ▲120.9436.58 ▼27.95
Media Library /wp-admin/upload.php1,478 ▲784.87 ▲0.72114.51 ▲13.7096.20 ▲47.57
Bacheca /wp-admin/admin.php?page=bacheca1,48611.15463.39137.70
Gestione Prenotazioni /wp-admin/admin.php?page=gest_prenotazioni1,1792.3533.2839.70
Mie Prenotazioni /wp-admin/admin.php?page=myprenotazioni9272.2040.0956.82
Parametri /wp-admin/admin.php?page=config1,6442.6965.3148.51
Spazi /wp-admin/edit.php?post_type=spazi1,1842.4337.5857.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_prenotazioni_spazi
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • widget_prenotazioni
    • widget_theysaidso_widget
    • widget_recent-posts
    • opt_PrenotazioniMail
    • theysaidso_admin_options
    • widget_recent-comments
    • opt_PrenotazioniParametri
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=gest_prenotazioni
    • > Warning in wp-content/plugins/prenotazioni/lib/tab_pre_gg.php+81
    Division by zero

SRP 50% 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/prenotazioni/Prenotazioni.widget.php
    • > /wp-content/plugins/prenotazioni/functions.inc.php
    • > /wp-content/plugins/prenotazioni/Prenotazioni.php
    • > /wp-content/plugins/prenotazioni/lib/frontend.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=bacheca
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=bacheca
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
    • > GET request to /wp-admin/admin.php?page=bacheca
    • > Deprecation (warning) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/y7/r/kOkd6HZtIYJ.js?_nc_x=Ij3Wp8lg5Kz 271 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=bacheca
    • > Console-api (severe) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/y7/r/kOkd6HZtIYJ.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."
    • > GET request to /wp-admin/admin.php?page=bacheca
    • > Rendering (warning) in unknown
    https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2FPrenotazioni-756571287730947%2F&tabs=timeline&width=340&height=500&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true&appId=315161832278306 - [.WebGL-0x238801077f00]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: prenotazioni aule, booking meeting rooms, prenotazione spazi

prenotazioni/Prenotazioni.php 92% from 13 tests

This is the main PHP file of "Prenotazioni" version 1.7.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("prenotazioni.php" instead of "Prenotazioni.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
Success! There were no dangerous files found in this plugin8,790 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS538753,617
SVG1002,671
PHP7591752,047
JavaScript4724455

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity30.25
▷ Minimum class complexity6.00
▷ Maximum class complexity52.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods50
▷ Static methods36.00%
▷ Public methods4998.00%
▷ Protected methods00.00%
▷ Private methods12.00%
Functions15
▷ Named functions15100.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
26 PNG files occupy 0.15MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/orario.png1.62KB1.05KB▼ 35.37%
img/opzioni.png2.28KB1.54KB▼ 32.36%
img/spazi.png2.88KB2.32KB▼ 19.45%
img/logo.png1.67KB1.62KB▼ 2.81%
img/help.png1.92KB1.54KB▼ 19.72%