10% albo-pretorio-on-line

Code Review | Albo Pretorio On line

WordPress plugin Albo Pretorio On line scored10%from 54 tests.

About plugin

  • Plugin page: albo-pretorio-on-...
  • Plugin version: 4.6.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Nov 13, 2011
  • Latest release: Sep 3, 2023
  • Number of updates: 150
  • Update frequency: every 28.8 days
  • Top authors: Ignazios (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active /63,166 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/albo-pretorio-on-line/AlboPretorio.php+2034
    Undefined variable: opt_AP_DefaultSoggetti

Server metrics [RAM: ▲1.57MB] [CPU: ▲0.60ms] Passed 4 tests

An overview of server-side resources used by Albo Pretorio On line
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.85 ▲1.3944.03 ▲2.82
Dashboard /wp-admin4.95 ▲1.6053.19 ▼8.16
Posts /wp-admin/edit.php5.00 ▲1.6560.00 ▲13.20
Add New Post /wp-admin/post-new.php7.55 ▲1.6693.94 ▼3.61
Media Library /wp-admin/upload.php4.86 ▲1.6447.85 ▲11.35
Soggetti /wp-admin/admin.php?page=soggetti4.9352.66
Parametri /wp-admin/admin.php?page=configAlboP4.8345.14
Categorie /wp-admin/admin.php?page=categorie4.8942.15
Enti /wp-admin/admin.php?page=enti4.9342.37
Tipi di Files /wp-admin/admin.php?page=tipifiles4.9143.74
Unità Organizzative /wp-admin/admin.php?page=unitao4.9343.99
Utility /wp-admin/admin.php?page=utilityAlboP5.3344.24
Permessi /wp-admin/admin.php?page=permessiAlboP4.8841.79
Tabelle /wp-admin/admin.php?page=tabelle4.8541.70
Atti /wp-admin/admin.php?page=atti5.8348.78

Server storage [IO: ▲2.93MB] [DB: ▲0.01MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • There were 3 files (0.07KB) illegally modified outside of "wp-content/plugins/albo-pretorio-on-line/" and "wp-content/uploads/"
    • (new file) robots.txt
    • (new file) wp-content/AlboOnLine/BackupDatiAlbo/.empty
    • (new file) wp-content/AlboOnLine/OblioDatiAlbo/.empty
Filesystem: 415 new files
Database: 8 new tables, 40 new options
New tables
wp_albopretorio_categorie
wp_albopretorio_resprocedura
wp_albopretorio_enti
wp_albopretorio_allegati
wp_albopretorio_atti
wp_albopretorio_attimeta
wp_albopretorio_log
wp_albopretorio_unitaorganizzative
New WordPress options
opt_AP_RuoliPulsVisualizzaAtto
db_upgraded
opt_AP_Versione
opt_AP_RuoliPulsGruppi
opt_AP_RestApi
opt_AP_LivelloTitoloPagina
opt_AP_Allegati
widget_albopretorio
opt_AP_AutoShortcode
opt_AP_ColonneFE
...

Browser metrics Passed 4 tests

Albo Pretorio On line: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,033 ▲27214.15 ▼0.206.55 ▲4.9336.77 ▼5.96
Dashboard /wp-admin2,326 ▲1465.19 ▼0.4198.95 ▼0.3592.69 ▲47.76
Posts /wp-admin/edit.php2,241 ▲1442.46 ▲0.4441.86 ▲5.6053.59 ▲19.85
Add New Post /wp-admin/post-new.php1,638 ▲11023.39 ▲0.45722.07 ▲48.4497.43 ▲44.15
Media Library /wp-admin/upload.php1,522 ▲1224.68 ▲0.4699.06 ▼3.4086.24 ▲41.00
Soggetti /wp-admin/admin.php?page=soggetti1,1882.6146.3245.27
Parametri /wp-admin/admin.php?page=configAlboP2,6104.5887.56133.83
Categorie /wp-admin/admin.php?page=categorie1,1612.5645.1834.90
Enti /wp-admin/admin.php?page=enti1,1872.4342.7638.45
Tipi di Files /wp-admin/admin.php?page=tipifiles1,3553.6158.6384.72
Unità Organizzative /wp-admin/admin.php?page=unitao1,1782.4642.8837.49
Utility /wp-admin/admin.php?page=utilityAlboP1,4362.4041.0765.88
Permessi /wp-admin/admin.php?page=permessiAlboP9882.3232.1634.79
Tabelle /wp-admin/admin.php?page=tabelle1,2882.7154.8474.02
Atti /wp-admin/admin.php?page=atti1,0812.6747.3540.24

Uninstaller [IO: ▲2.93MB] [DB: ▲0.01MB] 25% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall correctly, leaving 415 files (2.93MB) in the plugin directory
    • (new file) admin/atti.php
    • (new file) AlboPretorioWidget.php
    • (new file) admin/categorie.php
    • (new file) admin/admin.php
    • (new file) AlboPretorioFunctions.php
    • (new file) AlboPretorio.php
    • (new file) admin/allegati.php
    • (new file) Repertori/.empty
    • (new file) admin/allegati_multi.php
    • (new file) admin/enti.php
    • ...
  • Zombie tables were found after uninstall: 8 tables
    • wp_albopretorio_log
    • wp_albopretorio_unitaorganizzative
    • wp_albopretorio_attimeta
    • wp_albopretorio_atti
    • wp_albopretorio_allegati
    • wp_albopretorio_enti
    • wp_albopretorio_resprocedura
    • wp_albopretorio_categorie
  • Zombie WordPress options detected upon uninstall: 40 options
    • opt_AP_ColonneFE
    • opt_AP_OldInterfaccia
    • opt_AP_LivelloTitoloFiltri
    • opt_AP_NumeroProgressivo
    • opt_AP_LogOp
    • opt_AP_PAtto
    • opt_AP_ColoreDispari
    • opt_AP_RestApi_UrlEst
    • widget_alboonlineac
    • opt_AP_RestApi
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=soggetti
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD
    • > GET request to /wp-admin/admin.php?page=configAlboP
    • > Notice in wp-content/plugins/albo-pretorio-on-line/AlboPretorio.php+1501
    Undefined index: Data

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 23× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/albo-pretorio-on-line/admin/visatto.php
    • > /wp-content/plugins/albo-pretorio-on-line/admin/visatto_new.php
    • > /wp-content/plugins/albo-pretorio-on-line/AlboPretorioWidget.php
    • > /wp-content/plugins/albo-pretorio-on-line/admin/utility.php
    • > /wp-content/plugins/albo-pretorio-on-line/AlboPretorioFunctions.php
    • > /wp-content/plugins/albo-pretorio-on-line/admin/permessi.php
    • > /wp-content/plugins/albo-pretorio-on-line/admin/gruppiatti.php
    • > /wp-content/plugins/albo-pretorio-on-line/admin/visatto_new2.php
    • > /wp-content/plugins/albo-pretorio-on-line/admin/enti.php
    • > /wp-content/plugins/albo-pretorio-on-line/admin/gruppiatti_new2.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/albo-pretorio-on-line/admin/admin.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/albo-pretorio-on-line/inc/logaggiornamenti.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=tabelle
    • > Network (severe)
    wp-content/plugins/albo-pretorio-on-line/admin/css/images/ElaborazioneInCorso.gif - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
  • Plugin Name: You should set the name of your plugin on the first line ( === albo-pretorio-on-line === )
The official readme.txt might help

albo-pretorio-on-line/AlboPretorio.php 85% from 13 tests

"Albo Pretorio On line" version 4.6.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("albo-pretorio-on-line.php" instead of "AlboPretorio.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin30,748 lines of code in 137 files:
LanguageFilesBlank linesComment linesLines of code
PHP341,3232,47318,625
JSON2004,665
JavaScript16253292,239
HTML478241,953
CSS1491411,652
PO File1424498948
SVG66064666

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 101)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity199.00
▷ Minimum class complexity15.00
▷ Maximum class complexity553.00
Average method complexity9.40
▷ Minimum method complexity1.00
▷ Maximum method complexity101.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods118
▷ Static methods97.63%
▷ Public methods118100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions245
▷ Named functions23194.29%
▷ Anonymous functions145.71%
Constants78
▷ Global constants78100.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
178 PNG files occupy 0.18MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
css/build/src/icons/img/PNG/chevron-left.png0.28KB0.18KB▼ 36.40%
css/build/src/icons/img/PNG/link.png0.37KB0.30KB▼ 17.55%
css/build/src/icons/icons/img/PNG/external-link.png0.58KB0.39KB▼ 33.95%
css/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%