10% prodotti

Code Review | Prodotti

WordPress plugin Prodotti scored10%from 54 tests.

About plugin

  • Plugin page: prodotti
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 10, 2016
  • Latest release: Feb 10, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: rswstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /788 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/prodotti/prodotti_widget.php+72
    Function create_function() is deprecated

Server metrics [RAM: ▼1.38MB] [CPU: ▼48.91ms] Passed 4 tests

A check of server-side resources used by Prodotti
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.61 ▼0.857.08 ▼35.04
Dashboard /wp-admin2.63 ▼0.6811.01 ▼42.86
Posts /wp-admin/edit.php2.63 ▼0.7311.13 ▼35.76
Add New Post /wp-admin/post-new.php2.63 ▼3.2610.27 ▼81.96
Media Library /wp-admin/upload.php2.63 ▼0.609.30 ▼24.25
Tecnologia /wp-admin/edit-tags.php?taxonomy=tecnologia&post_type=product2.639.77
Taglia /wp-admin/edit-tags.php?taxonomy=taglia&post_type=product2.639.29
Colore /wp-admin/edit-tags.php?taxonomy=colore&post_type=product2.6310.58
Tag /wp-admin/edit-tags.php?taxonomy=product_tag&post_type=product2.639.42
Tutti i Prodotti /wp-admin/edit.php?post_type=product2.638.96
Prodotti /wp-admin/options-general.php?page=prodotti2.639.59
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins2.649.40
Aggiungi Prodotto /wp-admin/post-new.php?post_type=product2.639.26
Categorie /wp-admin/edit-tags.php?taxonomy=product_cat&post_type=product2.6320.94
Caratteristica /wp-admin/edit-tags.php?taxonomy=caratteristica&post_type=product2.639.74

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_prodotti_widget

Browser metrics Passed 4 tests

A check of browser resources used by Prodotti
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲16513.27 ▼1.171.54 ▼0.1839.86 ▼8.10
Dashboard /wp-admin2,291 ▲1005.84 ▲0.73115.92 ▲12.5286.23 ▲39.64
Posts /wp-admin/edit.php2,200 ▲1112.06 ▲0.0540.59 ▲3.0837.53 ▲1.93
Add New Post /wp-admin/post-new.php1,597 ▲8317.63 ▲0.09643.64 ▼10.7254.73 ▼13.68
Media Library /wp-admin/upload.php1,487 ▲964.24 ▲0.0698.55 ▼3.1284.87 ▲41.18
Tecnologia /wp-admin/edit-tags.php?taxonomy=tecnologia&post_type=product1,3642.3327.4639.85
Taglia /wp-admin/edit-tags.php?taxonomy=taglia&post_type=product1,3642.3327.6839.91
Colore /wp-admin/edit-tags.php?taxonomy=colore&post_type=product1,3642.3327.1337.45
Tag /wp-admin/edit-tags.php?taxonomy=product_tag&post_type=product1,3672.3330.1438.55
Tutti i Prodotti /wp-admin/edit.php?post_type=product1,2181.9934.2434.09
Prodotti /wp-admin/options-general.php?page=prodotti1,0242.2124.7528.92
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0652.0525.2329.06
Aggiungi Prodotto /wp-admin/post-new.php?post_type=product3,0497.82177.59137.76
Categorie /wp-admin/edit-tags.php?taxonomy=product_cat&post_type=product1,3702.3328.4035.77
Caratteristica /wp-admin/edit-tags.php?taxonomy=caratteristica&post_type=product1,3702.3328.3540.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/prodotti/prodotti_widget.php+72
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_prodotti_widget

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
Please fix the following server-side errors
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=caratteristica&post_type=product
    • > Deprecated in wp-content/plugins/prodotti/prodotti_widget.php+72
    Function create_function() is deprecated
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=caratteristica&post_type=product
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/post-new.php?post_type=product
    • > Notice in wp-content/plugins/prodotti/prodotti.php+91
    Undefined index: product
    • > GET request to /wp-admin/post-new.php?post_type=product
    • > Notice in wp-content/plugins/prodotti/prodotti.php+91
    Undefined offset: 1
    • > GET request to /wp-admin/post-new.php?post_type=product
    • > Notice in wp-content/plugins/prodotti/prodotti.php+92
    Undefined offset: 6
    • > GET request to /wp-admin/post-new.php?post_type=product
    • > Notice in wp-content/plugins/prodotti/prodotti.php+93
    Undefined offset: 9
    • > GET request to /wp-admin/post-new.php?post_type=product
    • > Notice in wp-content/plugins/prodotti/prodotti.php+97
    Undefined offset: 8
    • > GET request to /wp-admin/post-new.php?post_type=product
    • > Notice in wp-content/plugins/prodotti/prodotti.php+98
    Undefined offset: 10

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 action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/prodotti/prodotti.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/prodotti/prodotti_metabox.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/prodotti/prodotti_shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/prodotti/class-tgm-plugin-activation.php:161
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/prodotti/prodotti_opzioni.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prodotti/prodotti_tassonomie.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prodotti/prodotti_pluginaggiuntivi.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/prodotti/prodotti_widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === prodotti === )
You can look at the official readme.txt

prodotti/prodotti.php Passed 13 tests

The main PHP script in "Prodotti" version 1.0.0 is automatically included on every request by WordPress
31 characters long description:
gestione prodotti per wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,716 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP84018001,639
PO File1222777

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity42.40
▷ Minimum class complexity6.00
▷ Maximum class complexity113.00
Average method complexity5.31
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods48
▷ Static methods12.08%
▷ Public methods4287.50%
▷ Protected methods612.50%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/prodotti.png0.98KB0.98KB0.00%