84% chords-and-lyrics

Code Review | Chords and Lyrics

WordPress plugin Chords and Lyrics scored84%from 54 tests.

About plugin

  • Plugin page: chords-and-lyrics
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.9.5
  • WordPress version: 6.3.1
  • First release: Jan 28, 2010
  • Latest release: Apr 18, 2018
  • Number of updates: 12
  • Update frequency: every 252.8 days
  • Top authors: rlisle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /5,659 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.05MB] [CPU: ▼6.29ms] Passed 4 tests

Analyzing server-side resources used by Chords and Lyrics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.14 ▼4.25
Dashboard /wp-admin3.36 ▲0.0645.85 ▼4.49
Posts /wp-admin/edit.php3.47 ▲0.1145.27 ▼3.57
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.40 ▼12.83
Media Library /wp-admin/upload.php3.28 ▲0.0534.27 ▼2.37

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Chords and Lyrics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.82 ▲0.391.63 ▼0.1239.09 ▼5.75
Dashboard /wp-admin2,200 ▲115.83 ▲0.93106.62 ▼14.6135.83 ▼10.14
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0039.88 ▲3.3435.38 ▼0.53
Add New Post /wp-admin/post-new.php1,519 ▼017.74 ▼5.43656.67 ▲10.4355.55 ▼1.40
Media Library /wp-admin/upload.php1,391 ▲34.32 ▲0.1394.40 ▼1.3242.51 ▼1.30

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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chords-and-lyrics/ChordsAndLyrics.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (User option section on settings->reading page allows control of chords and/or lyrics display.)
The official readme.txt might help

chords-and-lyrics/ChordsAndLyrics.php 92% from 13 tests

Analyzing the main PHP file in "Chords and Lyrics" version 1.7
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("chords-and-lyrics.php" instead of "ChordsAndLyrics.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 plugin402 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151122402

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity103.00
▷ Minimum class complexity103.00
▷ Maximum class complexity103.00
Average method complexity8.29
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.85KB14.89KB▼ 6.09%