84% guitar-chord-widget-for-wordpress

Code Review | Guitar Chords Widget for Wordpress

WordPress plugin Guitar Chords Widget for Wordpress scored84%from 54 tests.

About plugin

  • Plugin page: guitar-chord-widg...
  • Plugin version: 1.51
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Feb 25, 2010
  • Latest release: May 10, 2022
  • Number of updates: 29
  • Update frequency: every 153.7 days
  • Top authors: theguitarlesson (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /7,973 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Guitar Chords Widget for Wordpress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.31 ▼5.77
Dashboard /wp-admin3.33 ▲0.0352.73 ▼0.27
Posts /wp-admin/edit.php3.38 ▲0.0249.46 ▲0.54
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.61 ▼15.06
Media Library /wp-admin/upload.php3.25 ▲0.0235.20 ▲0.75

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_pnj_show_guitar_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Guitar Chords Widget for Wordpress: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.08 ▼1.354.02 ▲1.9540.54 ▼6.85
Dashboard /wp-admin2,203 ▲145.91 ▲0.91109.42 ▼12.8537.81 ▼12.50
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0439.22 ▼0.2938.61 ▲2.54
Add New Post /wp-admin/post-new.php1,514 ▼1917.80 ▼5.56626.85 ▼52.2564.45 ▲7.53
Media Library /wp-admin/upload.php1,388 ▼34.13 ▼0.0896.00 ▼2.7441.82 ▼1.25

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_pnj_show_guitar_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/guitar-chord-widget-for-wordpress/guitar-widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Activation after upload to your server), #2 (Place the widget into your sidebar), #3 (Your site visitors have access to over 1,400 chord charts)
The official readme.txt is a good inspiration

guitar-chord-widget-for-wordpress/guitar-widget.php 92% from 13 tests

The main file in "Guitar Chords Widget for Wordpress" v. 1.51 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("guitar-chord-widget-for-wordpress.php" instead of "guitar-widget.php")

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
Everything looks great! No dangerous files found in this plugin129 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12426129

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected