10% corsi

Code Review | Corsi

WordPress plugin Corsi scored10%from 54 tests.

About plugin

  • Plugin page: corsi
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-5.7.0
  • WordPress version: 6.3.1
  • First release: Feb 4, 2016
  • Latest release: Mar 16, 2021
  • Number of updates: 4
  • Update frequency: every 467.0 days
  • Top authors: rswstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,283 total downloads

Benchmarks

Plugin footprint 40% 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 validation failed for this plugin
    • > Deprecated in wp-content/plugins/corsi/corsi_widget.php+72
    Function create_function() is deprecated

Server metrics [RAM: ▼1.39MB] [CPU: ▼54.14ms] Passed 4 tests

Server-side resources used by Corsi
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.60 ▼0.868.65 ▼34.17
Dashboard /wp-admin2.62 ▼0.6810.52 ▼46.11
Posts /wp-admin/edit.php2.62 ▼0.739.87 ▼40.67
Add New Post /wp-admin/post-new.php2.62 ▼3.278.03 ▼95.62
Media Library /wp-admin/upload.php2.62 ▼0.618.52 ▼28.15
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins2.6310.48
Tag /wp-admin/edit-tags.php?taxonomy=corsi_tag&post_type=corsi2.628.34
Aggiungi Ccorso /wp-admin/post-new.php?post_type=corsi2.6210.08
Categorie /wp-admin/edit-tags.php?taxonomy=corsi_cat&post_type=corsi2.6210.09
Tutti i corsi /wp-admin/edit.php?post_type=corsi2.6210.06

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Corsi
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10514.35 ▲0.001.58 ▼0.0337.87 ▼4.19
Dashboard /wp-admin2,266 ▲895.56 ▼0.1287.31 ▼0.7043.68 ▼2.34
Posts /wp-admin/edit.php2,183 ▲802.17 ▲0.1438.53 ▼0.3937.84 ▼7.79
Add New Post /wp-admin/post-new.php1,590 ▲6423.33 ▼0.29668.63 ▲47.6655.05 ▲7.87
Media Library /wp-admin/upload.php1,482 ▲854.21 ▲0.0697.08 ▼6.5449.60 ▲4.02
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0132.0626.6829.51
Tag /wp-admin/edit-tags.php?taxonomy=corsi_tag&post_type=corsi1,3562.3028.7437.34
Aggiungi Ccorso /wp-admin/post-new.php?post_type=corsi2,6647.72174.6374.14
Categorie /wp-admin/edit-tags.php?taxonomy=corsi_cat&post_type=corsi1,3562.1828.4335.67
Tutti i corsi /wp-admin/edit.php?post_type=corsi1,1691.9832.9140.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/corsi/corsi_widget.php+72
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_corsi_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_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
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=corsi
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/corsi/corsi_widget.php+72
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=corsi
    • > 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.

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/corsi/corsi.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/corsi/corsi_opzioni.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/corsi/corsi_metabox.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/corsi/corsi_pluginaggiuntivi.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/corsi/corsi_shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/corsi/corsi_widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/corsi/corsi_tassonomie.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/corsi/class-tgm-plugin-activation.php:161

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === corsi === )
  • Screenshots: Add an image for screenshot #2 (screenshot-2.jpg)
You can take inspiration from this readme.txt

corsi/corsi.php Passed 13 tests

"Corsi" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
28 characters long description:
Corsi, Courses per wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,593 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP83978551,516
PO File1222777

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected