84% sheet-music-library

Code Review | Sheet Music Libary

WordPress plugin Sheet Music Libary scored 84% from 54 tests.

About plugin

  • Plugin page: sheet-music-library
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 16, 2015
  • Latest release: Sep 18, 2023
  • Number of updates: 52
  • Update frequency: every 56.8 days
  • Top authors: celloexpressions (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 8,167 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▲2.30ms] Passed 4 tests

Analyzing server-side resources used by Sheet Music Libary
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3741.34 ▼2.79
Dashboard /wp-admin3.64 ▲0.3350.96 ▲3.85
Posts /wp-admin/edit.php3.75 ▲0.3949.61 ▲3.34
Add New Post /wp-admin/post-new.php6.49 ▲0.61103.65 ▲8.75
Media Library /wp-admin/upload.php3.56 ▲0.3340.46 ▲4.81
Add New Piece /wp-admin/post-new.php?post_type=sheet_music6.5291.67
Genres /wp-admin/edit-tags.php?taxonomy=genre&post_type=sheet_music3.5537.59
Composer /wp-admin/edit-tags.php?taxonomy=composer&post_type=sheet_music3.5534.96
Difficulties /wp-admin/edit-tags.php?taxonomy=difficulty&post_type=sheet_music3.5535.67
Orchestration /wp-admin/edit-tags.php?taxonomy=orchestration&post_type=sheet_music3.5534.28
Sheet Music /wp-admin/edit.php?post_type=sheet_music3.6044.76
Collections /wp-admin/edit-tags.php?taxonomy=sml_collection&post_type=sheet_music3.5535.60

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Sheet Music Libary
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲13213.22 ▼1.441.58 ▼0.0544.78 ▼1.86
Dashboard /wp-admin2,253 ▲624.84 ▼0.05106.75 ▲2.9839.77 ▼4.47
Posts /wp-admin/edit.php2,136 ▲682.01 ▼0.0235.93 ▲1.1330.34 ▼2.06
Add New Post /wp-admin/post-new.php6,580 ▲5,05224.78 ▲6.65890.59 ▲258.3556.90 ▼19.38
Media Library /wp-admin/upload.php1,435 ▲504.20 ▲0.0095.80 ▼4.3843.26 ▼0.70
Add New Piece /wp-admin/post-new.php?post_type=sheet_music1,71617.33855.5749.03
Genres /wp-admin/edit-tags.php?taxonomy=genre&post_type=sheet_music1,3062.2627.3830.41
Composer /wp-admin/edit-tags.php?taxonomy=composer&post_type=sheet_music1,2782.1427.6429.22
Difficulties /wp-admin/edit-tags.php?taxonomy=difficulty&post_type=sheet_music1,3062.1326.4725.68
Orchestration /wp-admin/edit-tags.php?taxonomy=orchestration&post_type=sheet_music1,2782.1427.9525.59
Sheet Music /wp-admin/edit.php?post_type=sheet_music1,1831.9438.3634.33
Collections /wp-admin/edit-tags.php?taxonomy=sml_collection&post_type=sheet_music1,2812.1630.6526.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_sheet_music_library_recent_playlist_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_sheet_music_library_playlist_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sheet-music-library/admin/customize-options.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sheet-music-library/post-type.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sheet-music-library/taxonomies.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sheet-music-library/sheet-music-library.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sheet-music-library/block-functions.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sheet-music-library/admin/post-meta.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sheet-music-library/template/sheet-music-library-recent-playlist-widget.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sheet-music-library/admin/ajax-actions.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sheet-music-library/template/sheet-music-library-playlist-widget.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: library, sheet music, music library, music

sheet-music-library/sheet-music-library.php Passed 13 tests

"Sheet Music Libary" version 2.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
85 characters long description:
Add a sheet music library, including PDFs, audio, descriptions and more to your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,734 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP13173200989
CSS77318333
JavaScript63847317
JSON50095

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.50
▷ Minimum class complexity6.00
▷ Maximum class complexity7.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin