10% musicbox

Code Review | Musicbox

WordPress plugin Musicbox scored10%from 54 tests.

About plugin

  • Plugin page: musicbox
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2015
  • Latest release: Sep 11, 2016
  • Number of updates: 11
  • Update frequency: every 26.5 days
  • Top authors: websitedesignby (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /5,249 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/musicbox/webdesignby-musicbox-widget.php+133
    Function create_function() is deprecated

Server metrics [RAM: ▼1.74MB] [CPU: ▼45.54ms] Passed 4 tests

An overview of server-side resources used by Musicbox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.25 ▼1.228.10 ▼30.59
Dashboard /wp-admin2.27 ▼1.049.29 ▼36.81
Posts /wp-admin/edit.php2.27 ▼1.0911.09 ▼38.88
Add New Post /wp-admin/post-new.php2.27 ▼3.6219.11 ▼75.89
Media Library /wp-admin/upload.php2.27 ▼0.9611.96 ▼24.63
Add Musicbox /wp-admin/admin.php?page=webdesignby-musicbox-edit2.2713.74
Musicbox /wp-admin/admin.php?page=webdesignby-musicbox2.2712.89

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 384 new files
Database: 3 new tables, 7 new options
New tables
wp_webdesignby_musicbox_musicbox_tracks_assoc
wp_webdesignby_musicbox_tracks
wp_webdesignby_musicbox
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_webdesignby_musicbox_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Musicbox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.30 ▼1.064.39 ▲2.7241.79 ▼0.20
Dashboard /wp-admin2,237 ▲465.81 ▲0.9198.78 ▼2.5339.26 ▼3.84
Posts /wp-admin/edit.php2,123 ▲342.06 ▲0.0335.06 ▼5.7833.47 ▼0.72
Add New Post /wp-admin/post-new.php1,543 ▲1417.57 ▼0.68650.51 ▲59.0861.56 ▲8.75
Media Library /wp-admin/upload.php1,422 ▲404.18 ▼0.0694.62 ▼6.0440.74 ▼4.07
Add Musicbox /wp-admin/admin.php?page=webdesignby-musicbox-edit8282.0623.2329.57
Musicbox /wp-admin/admin.php?page=webdesignby-musicbox8341.9423.8824.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/musicbox/webdesignby-musicbox-widget.php+133
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_webdesignby_musicbox_widget
    • widget_recent-posts
    • can_compress_scripts

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=webdesignby-musicbox
    • > Deprecated in wp-content/plugins/musicbox/webdesignby-musicbox-widget.php+133
    Function create_function() is deprecated

SRP 0% 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 take a closer look at the following
  • 28× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/musicbox/lib/BaseModel.php
    • > /wp-content/plugins/musicbox/trunk/lib/MusicboxModel.php
    • > /wp-content/plugins/musicbox/trunk/config.php
    • > /wp-content/plugins/musicbox/trunk/webdesignby-musicbox-widget.php
    • > /wp-content/plugins/musicbox/config.php
    • > /wp-content/plugins/musicbox/lib/MusicboxPlugin.php
    • > /wp-content/plugins/musicbox/trunk/lib/iTunesInfo.php
    • > /wp-content/plugins/musicbox/lib/Registry.php
    • > /wp-content/plugins/musicbox/webdesignby-musicbox-widget.php
    • > /wp-content/plugins/musicbox/trunk/lib/Base.php
  • 30× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/musicbox/view/musicbox2.php on line 7
    • > PHP Notice
      Undefined variable: musicbox in wp-content/plugins/musicbox/trunk/view/admin/musicbox-content.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/musicbox/trunk/view/admin/musicbox-edit.php:19
    • > PHP Notice
      Undefined variable: description in wp-content/plugins/musicbox/view/musicbox2.php on line 8
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/musicbox/trunk/view/musicbox2.php on line 7
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/musicbox/view/musicbox2.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/musicbox/view/musicbox2.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/musicbox/trunk/view/musicbox2.php on line 7
    • > PHP Notice
      Undefined variable: description in wp-content/plugins/musicbox/trunk/view/musicbox2.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/musicbox/view/admin/musicbox.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: tracks, playlist, player, itunes, musicbox...

musicbox/webdesignby-musicbox.php 85% from 13 tests

Analyzing the main PHP file in "Musicbox" version 2.0.3
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("musicbox.php" instead of "webdesignby-musicbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin38,902 lines of code in 101 files:
LanguageFilesBlank linesComment linesLines of code
HTML338,33936819,276
JavaScript182,7581,84810,622
CSS281,1006517,276
PHP203751801,610
XHTML139599
XML141019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.08
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes24
▷ Abstract classes416.67%
▷ Concrete classes2083.33%
▷ Final classes00.00%
Methods178
▷ Static methods63.37%
▷ Public methods14078.65%
▷ Protected methods84.49%
▷ Private methods3016.85%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
72 compressed PNG files occupy 0.17MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/jquery-ui-1.11.4.custom/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
trunk/vendor/soundmanager/demo/play-mp3-links/image/icon_pause.png0.18KB0.24KB0.00%
trunk/vendor/soundmanager/demo/page-player/image/top-highlight.png0.15KB0.26KB0.00%
vendor/soundmanager/demo/play-mp3-links/image/icon_play.png0.21KB0.31KB0.00%
trunk/js/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%