79% soldi-pubblici

Code Review | Soldi Pubblici

WordPress plugin Soldi Pubblici scored79%from 54 tests.

About plugin

  • Plugin page: soldi-pubblici
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2
  • WordPress version: 6.3.1
  • First release: Mar 1, 2015
  • Latest release: Apr 17, 2015
  • Number of updates: 14
  • Update frequency: every 3.4 days
  • Top authors: Milmor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /711 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.89ms] Passed 4 tests

An overview of server-side resources used by Soldi Pubblici
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.88 ▲1.29
Dashboard /wp-admin3.32 ▲0.0249.73 ▲0.29
Posts /wp-admin/edit.php3.37 ▲0.0247.34 ▼4.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.98 ▼16.88
Media Library /wp-admin/upload.php3.24 ▲0.0236.08 ▲1.22
Soldi Pubblici /wp-admin/admin.php?page=sp_wpgov_settings3.2135.32
WPGov.it /wp-admin/admin.php?page=impostazioni-wpgov3.1932.39

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Soldi Pubblici: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.25 ▼0.101.68 ▼0.1442.79 ▼1.21
Dashboard /wp-admin2,218 ▲385.62 ▼0.0589.75 ▼3.1341.24 ▼3.01
Posts /wp-admin/edit.php2,123 ▲232.02 ▲0.0140.72 ▲3.1336.34 ▼0.59
Add New Post /wp-admin/post-new.php1,545 ▲1923.00 ▲0.01678.46 ▲15.1854.29 ▼2.45
Media Library /wp-admin/upload.php1,420 ▲204.20 ▲0.0899.24 ▼14.8244.74 ▼4.69
Soldi Pubblici /wp-admin/admin.php?page=sp_wpgov_settings7791.9927.1125.02
WPGov.it /wp-admin/admin.php?page=impostazioni-wpgov7802.0224.0423.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=impostazioni-wpgov
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'sp_wpgov_settings' not found or invalid function name

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/soldi-pubblici/soldi-pubblici.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_atts() in wp-content/plugins/soldi-pubblici/inc/shortcode.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: marco, pubblici, spesa, soldi, wpgov...

soldi-pubblici/soldi-pubblici.php Passed 13 tests

Analyzing the main PHP file in "Soldi Pubblici" version 0.2.1
65 characters long description:
Plugin per l'interfacciamento con il portale soldipubblici.gov.it

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
No dangerous file extensions were detected139 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP43410138
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/media/logo-siope.png7.83KB2.83KB▼ 63.90%
inc/media/logo.png2.69KB1.87KB▼ 30.65%