72% avcp

Code Review | ANAC XML Bandi di Gara

WordPress plugin ANAC XML Bandi di Gara scored72%from 54 tests.

About plugin

  • Plugin page: avcp
  • Plugin version: 7.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Oct 23, 2013
  • Latest release: Oct 19, 2023
  • Number of updates: 163
  • Update frequency: every 22.4 days
  • Top authors: Milmor (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active /37,974 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▼0.03ms] Passed 4 tests

A check of server-side resources used by ANAC XML Bandi di Gara
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.6044.65 ▲6.29
Dashboard /wp-admin3.99 ▲0.6951.19 ▲2.87
Posts /wp-admin/edit.php4.05 ▲0.6949.30 ▲4.19
Add New Post /wp-admin/post-new.php6.71 ▲0.8277.70 ▼13.49
Media Library /wp-admin/upload.php3.86 ▲0.6343.31 ▲8.58
Importa /wp-admin/edit.php?post_type=avcp&page=anac_import3.8236.54
Nuova voce /wp-admin/post-new.php?post_type=avcp4.1363.28
Uffici & Settori /wp-admin/edit-tags.php?taxonomy=areesettori&post_type=avcp3.8541.47
Impostazioni /wp-admin/edit.php?post_type=avcp&page=wpgov_avcp3.8440.64
Validazione /wp-admin/edit.php?post_type=avcp&page=avcp_v_dataset3.8639.84
Ditte /wp-admin/edit-tags.php?taxonomy=ditte&post_type=avcp3.8540.80
Bandi /wp-admin/edit.php?post_type=avcp3.9941.84

Server storage [IO: ▲0.90MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • The plugin illegally modified 1 file (4.75KB) outside of "wp-content/plugins/avcp/" and "wp-content/uploads/"
    • (new file) avcp/index.php
Filesystem: 126 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
avcp_version_number
annirif_children
widget_recent-comments
can_compress_scripts
anac_log
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

ANAC XML Bandi di Gara: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲6014.17 ▼0.241.59 ▼0.2338.76 ▼2.10
Dashboard /wp-admin2,252 ▲725.59 ▲0.0184.50 ▼4.4241.42 ▲0.15
Posts /wp-admin/edit.php2,154 ▲542.02 ▼0.0836.00 ▲1.3136.59 ▼2.65
Add New Post /wp-admin/post-new.php1,576 ▲4823.10 ▼0.36664.75 ▼19.1353.20 ▼0.95
Media Library /wp-admin/upload.php1,454 ▲544.20 ▲0.02109.08 ▲9.8148.41 ▲4.48
Importa /wp-admin/edit.php?post_type=avcp&page=anac_import8362.1428.5737.99
Nuova voce /wp-admin/post-new.php?post_type=avcp3,0077.72187.8579.62
Uffici & Settori /wp-admin/edit-tags.php?taxonomy=areesettori&post_type=avcp1,3712.3029.5832.29
Impostazioni /wp-admin/edit.php?post_type=avcp&page=wpgov_avcp9332.0124.2330.33
Validazione /wp-admin/edit.php?post_type=avcp&page=avcp_v_dataset1,1402.2923.5729.83
Ditte /wp-admin/edit-tags.php?taxonomy=ditte&post_type=avcp1,3582.3529.7532.90
Bandi /wp-admin/edit.php?post_type=avcp1,1792.0430.5430.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • avcp_version_number
    • anac_log
    • annirif_children
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/avcp/opendata/graph.php
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avcp/avcp_metabox_generator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function query_posts() in wp-content/plugins/avcp/utilities/update_6.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/avcp/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avcp/taxfilteringbackend.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/avcp/tablegen.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avcp/avcp.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/avcp/opendata/3.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function query_posts() in wp-content/plugins/avcp/opendata/4.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Tax_Meta_Class' not found in wp-content/plugins/avcp/avcp_taxonomy_fields.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avcp/avcp_create_taxonomy.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=ditte&post_type=avcp
    • > Network (severe)
    wp-content/plugins/avcp/Tax-meta-class/css/Tax-meta-class.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=ditte&post_type=avcp
    • > Network (severe)
    wp-content/plugins/avcp/Tax-meta-class/js/tax-meta-clss.js - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=ditte&post_type=avcp
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 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.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt is a good inspiration

avcp/avcp.php Passed 13 tests

"ANAC XML Bandi di Gara" version 7.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
113 characters long description:
Generatore XML per ANAC (ex AVCP) e gestione bandi di gara e contratti (Legge 190/2012 art. 1.32 & D.Lgs 33/2013)

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
No dangerous file extensions were detected13,936 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript159349187,627
PHP245838983,072
CSS145333722,511
XSD6013472
PO File76377248
Markdown1406

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity203.00
▷ Minimum class complexity203.00
▷ Maximum class complexity203.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods72100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions55
▷ Named functions4480.00%
▷ Anonymous functions1120.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
43 PNG files occupy 0.11MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
meta-box-class/js/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
meta-box-class/js/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
meta-box-class/js/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
images/sort_asc.png1.09KB0.25KB▼ 77.46%
images/wpgov.png0.43KB0.25KB▼ 41.67%