10% necrologi-italia-nicv

Code Review | Necrologi Italia NICV

WordPress plugin Necrologi Italia NICV scored10%from 54 tests.

About plugin

  • Plugin page: necrologi-italia-...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Sep 8, 2022
  • Latest release: Mar 8, 2023
  • Number of updates: 117
  • Update frequency: every 1.6 days
  • Top authors: methodosrl (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /693 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/necrologi-italia-nicv/functions.php+1869
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.51MB] [CPU: ▲734.91ms] 50% from 4 tests

Server-side resources used by Necrologi Italia NICV
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 778.63ms on /wp-admin/admin.php?page=nicv-utilizzo)
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 734.91ms on /wp-admin/admin.php?page=nicv-utilizzo)
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.57794.35 ▲753.83
Dashboard /wp-admin3.85 ▲0.54749.55 ▲703.84
Posts /wp-admin/edit.php3.90 ▲0.54791.07 ▲743.09
Add New Post /wp-admin/post-new.php6.37 ▲0.48848.74 ▲759.61
Media Library /wp-admin/upload.php3.71 ▲0.48773.81 ▲738.88
Custom CSS /wp-admin/admin.php?page=nicv-css-plugin3.68903.09
Configurazione /wp-admin/admin.php?page=nicv-plugin3.68764.21
Installazione /wp-admin/admin.php?page=nicv-utilizzo3.68778.63

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 76 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
nicv_settings
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
nicv_css_settings
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Necrologi Italia NICV: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲21613.89 ▼0.485.92 ▲4.2737.52 ▼6.39
Dashboard /wp-admin2,237 ▲524.96 ▲0.0697.87 ▼4.1080.83 ▲42.15
Posts /wp-admin/edit.php2,132 ▲432.12 ▲0.0633.17 ▼4.2532.93 ▲1.52
Add New Post /wp-admin/post-new.php1,705 ▲17020.39 ▼0.69618.09 ▼91.1442.65 ▼16.10
Media Library /wp-admin/upload.php1,431 ▲404.21 ▲0.0293.06 ▼8.8081.98 ▲36.99
Custom CSS /wp-admin/admin.php?page=nicv-css-plugin1,1731.8023.6229.39
Configurazione /wp-admin/admin.php?page=nicv-plugin1,3061.7826.2234.04
Installazione /wp-admin/admin.php?page=nicv-utilizzo9681.8023.2532.19

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • nicv_css_settings
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • nicv_settings
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/necrologi-italia-nicv/nicaptcha.jpeg.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/necrologi-italia-nicv/nicv.siteping.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/necrologi-italia-nicv/nicv.conf.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/necrologi-italia-nicv/nicv.conf.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/necrologi-italia-nicv/nicv.conf.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/necrologi-italia-nicv/functions.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/necrologi-italia-nicv/nicv.conf.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (24 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

necrologi-italia-nicv/nicv.php 85% from 13 tests

"Necrologi Italia NICV" version 2.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 250 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("necrologi-italia-nicv.php" instead of "nicv.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,892 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP10768992,435
SVG966563
JavaScript4165183546
CSS410856348

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants31
▷ Global constants31100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
43 PNG files occupy 0.41MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-nicv/scheda-defunto.png2.05KB1.35KB▼ 34.22%
images/icon-nicv/ricerca-defunto.png0.73KB0.40KB▼ 45.17%
images/texture/subtle_white_feathers.png162.66KB124.11KB▼ 23.70%
images/icon-nicv/icona-ringraziamento.png1.69KB0.55KB▼ 67.40%
images/social/icona-telefono.png1.67KB1.32KB▼ 20.66%