68% wp-soundsystem

Code Review | WP SoundSystem

WordPress plugin WP SoundSystem scored 68% from 54 tests.

About plugin

  • Plugin page: wp-soundsystem
  • Plugin version: 3.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 5.8.1
  • First release: Feb 25, 2017
  • Latest release: Jul 27, 2021
  • Number of updates: 247
  • Update frequency: every 6.5 days
  • Top authors: grosbouff (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

200+ active / 9,866 total downloads

Benchmarks

Plugin footprint 65% 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: ▲1.74MB] [CPU: ▼141.21ms] 75% from 4 tests

A check of server-side resources used by WP SoundSystem
Please fix the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 545.13ms on /wp-admin/admin.php?page=wpsstm)
PageMemory (MB)CPU Time (ms)
Home /5.20 ▲2.3764.78 ▲20.72
Dashboard /wp-admin5.46 ▲2.4177.49 ▲24.92
Posts /wp-admin/edit.php5.53 ▲2.4269.84 ▲21.47
Add New Post /wp-admin/post-new.php5.22 ▼0.2142.87 ▼620.03
Media Library /wp-admin/upload.php5.40 ▲2.4053.74 ▲13.02
Albums /wp-admin/edit.php?post_type=wpsstm_release5.462,321.36
Radios /wp-admin/edit.php?post_type=wpsstm_radio5.60323.37
Tracks Links /wp-admin/edit.php?post_type=wpsstm_track_link5.4760.27
Artists /wp-admin/edit.php?post_type=wpsstm_artist5.4656.55
Tracks /wp-admin/edit.php?post_type=wpsstm_track5.4755.37
Playlists /wp-admin/edit.php?post_type=wpsstm_playlist5.462,315.54
Settings /wp-admin/admin.php?page=wpsstm5.40545.13

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 138 new files
Database: 1 new table, 2 new options
New tables
wp_wpsstm_subtracks
New WordPress options
_wpsstm-db_version
wpsstm_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP SoundSystem
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,106 ▲53418.24 ▲2.5822.46 ▲9.8549.82 ▼1.05
Dashboard /wp-admin3,111 ▲1806.92 ▲0.76156.18 ▼13.49121.55 ▼6.09
Posts /wp-admin/edit.php2,896 ▲1573.12 ▲0.4088.61 ▲8.9898.95 ▼1.54
Add New Post /wp-admin/post-new.php1,693 ▲1022.45 ▲3.71317.10 ▼119.09122.17 ▼1.56
Media Library /wp-admin/upload.php1,871 ▲645.53 ▲0.52171.89 ▼48.21127.64 ▼46.23
Albums /wp-admin/edit.php?post_type=wpsstm_release1,6193.0281.1680.88
Radios /wp-admin/edit.php?post_type=wpsstm_radio2,7553.3693.1996.71
Tracks Links /wp-admin/edit.php?post_type=wpsstm_track_link1,6272.9787.2277.64
Artists /wp-admin/edit.php?post_type=wpsstm_artist1,6192.9683.4879.72
Tracks /wp-admin/edit.php?post_type=wpsstm_track1,6772.9778.7782.01
Playlists /wp-admin/edit.php?post_type=wpsstm_playlist1,6302.9678.1281.37
Settings /wp-admin/admin.php?page=wpsstm1,6932.9385.32117.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_wpsstm_subtracks
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • _wpsstm-db_version
    • wpsstm_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpsstm_playlist
    • > Notice in wp-content/plugins/wp-soundsystem/wpsstm-core-tracklists.php+373
    Trying to get property 'post_type' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 75× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LastFmApi\\Api\\BaseApi' not found in wp-content/plugins/wp-soundsystem/_inc/php/matto1990/lastfm-api/src/lastfmapi/Api/ArtistApi.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpsstm() in wp-content/plugins/wp-soundsystem/classes/wpsstm-post-tracklist-class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Tests\\Api\\BaseNotAuthenticatedApiTest' not found in wp-content/plugins/wp-soundsystem/_inc/php/matto1990/lastfm-api/tests/Api/TrackTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Tests\\Api\\BaseNotAuthenticatedApiTest' not found in wp-content/plugins/wp-soundsystem/_inc/php/matto1990/lastfm-api/tests/Api/ChartTest.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-soundsystem/wpsstm-core-importer.php:703
    • > PHP Fatal error
      Uncaught Error: Class 'Tests\\Api\\BaseNotAuthenticatedApiTest' not found in wp-content/plugins/wp-soundsystem/_inc/php/matto1990/lastfm-api/tests/Api/UserTest.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-soundsystem/wp-soundsystem.php:97
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-soundsystem/wpsstm-core-api.php:229
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-soundsystem/wpsstm-core-track-links.php:906
    • > PHP Fatal error
      Uncaught Error: Class 'LastFmApi\\Api\\BaseApi' not found in wp-content/plugins/wp-soundsystem/_inc/php/matto1990/lastfm-api/src/lastfmapi/Api/UserApi.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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 need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

wp-soundsystem/wp-soundsystem.php Passed 13 tests

"WP SoundSystem" version 3.4.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
136 characters long description:
Manage a music library within Wordpress; including playlists, tracks, artists, albums and radios. The perfect fit for your music blog !

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected20,381 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
PHP9638,17556,11714,713
CSS6941532,080
JavaScript106833342,073
Sass10182131,351
JSON300101
Markdown19037
XML12018
Ruby1108

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity23.04
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces7
Interfaces0
Traits1
Classes80
▷ Abstract classes56.25%
▷ Concrete classes7593.75%
▷ Final classes00.00%
Methods798
▷ Static methods10112.66%
▷ Public methods71289.22%
▷ Protected methods212.63%
▷ Private methods658.15%
Functions64
▷ Named functions4976.56%
▷ Anonymous functions1523.44%
Constants35
▷ Global constants2262.86%
▷ Class constants1337.14%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin