84% music-sheet-viewer

Code Review | Music Sheet Viewer

WordPress plugin Music Sheet Viewer scored84%from 54 tests.

About plugin

  • Plugin page: music-sheet-viewer
  • Plugin version: 4.1
  • PHP compatiblity: 5.6.32+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2018
  • Latest release: May 19, 2023
  • Number of updates: 47
  • Update frequency: every 38.2 days
  • Top authors: efreja (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,456 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼13.87ms] Passed 4 tests

Analyzing server-side resources used by Music Sheet Viewer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1537.15 ▼4.37
Dashboard /wp-admin3.46 ▲0.1144.98 ▼21.45
Posts /wp-admin/edit.php3.57 ▲0.2147.29 ▲0.78
Add New Post /wp-admin/post-new.php6.32 ▲0.4374.03 ▼29.60
Media Library /wp-admin/upload.php3.38 ▲0.1534.10 ▼0.05
Music Sheet Viewer /wp-admin/options-general.php?page=msvoptions-group3.3533.35

Server storage [IO: ▲60.35MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • Total filesystem usage must be limited to 25MB (currently using 60.35MB)
Filesystem: 152 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
msv_instrument
can_compress_scripts
widget_theysaidso_widget
msv_mxl_unzip_method
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Music Sheet Viewer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲17220.72 ▲6.10148.63 ▲146.7536.31 ▼7.04
Dashboard /wp-admin2,207 ▲225.79 ▲0.6897.70 ▼10.8440.29 ▲1.16
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0439.37 ▼1.2934.48 ▼6.71
Add New Post /wp-admin/post-new.php6,185 ▲4,64319.34 ▲1.11837.16 ▲233.8736.41 ▼11.26
Media Library /wp-admin/upload.php1,392 ▲44.31 ▲0.0897.47 ▼10.8042.07 ▼4.14
Music Sheet Viewer /wp-admin/options-general.php?page=msvoptions-group1,1661.7226.1128.12

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/music-sheet-viewer/music-sheet-viewer.php:120

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: abc, sheet, mei, javascript, pae...

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

The main PHP file in "Music Sheet Viewer" ver. 4.1 adds more information about the plugin and also serves as the entry point for this plugin
73 characters long description:
Allows you to display sheet music from its MusicXML, MEI, ABC, PAE.. code

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected2,985 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript779434102,183
PHP1149172774
CSS10028

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity58.00
▷ Minimum class complexity21.00
▷ Maximum class complexity95.00
Average method complexity4.68
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods1651.61%
▷ Protected methods1548.39%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants37
▷ Global constants00.00%
▷ Class constants37100.00%
▷ Public constants37100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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