78% spotify-master

Code Review | TechGasp Music Master

WordPress plugin TechGasp Music Master scored78%from 54 tests.

About plugin

  • Plugin page: spotify-master
  • Plugin version: 5.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: Jul 3, 2013
  • Latest release: Mar 11, 2021
  • Number of updates: 73
  • Update frequency: every 38.5 days
  • Top authors: TechGasp (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

1,000+ active /79,506 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.53ms] Passed 4 tests

Server-side resources used by TechGasp Music Master
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.13 ▼0.54
Dashboard /wp-admin3.37 ▲0.0751.62 ▼3.86
Posts /wp-admin/edit.php3.43 ▲0.0753.26 ▲6.73
Add New Post /wp-admin/post-new.php5.96 ▲0.0794.47 ▼3.64
Media Library /wp-admin/upload.php3.30 ▲0.0737.60 ▼2.07
Music Master /wp-admin/admin.php?page=spotify-master3.2829.44
Add-ons /wp-admin/admin.php?page=spotify-master-admin-addons3.3233.52

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_spotify_master_widget_buttons
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for TechGasp Music Master
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲10513.14 ▼1.231.75 ▼0.0742.55 ▲1.05
Dashboard /wp-admin2,235 ▲474.90 ▼0.01107.01 ▼3.5886.65 ▲44.25
Posts /wp-admin/edit.php2,118 ▲262.01 ▼0.1638.20 ▼2.0235.28 ▼1.93
Add New Post /wp-admin/post-new.php1,689 ▲15522.09 ▼1.16672.46 ▲1.4848.88 ▼8.22
Media Library /wp-admin/upload.php1,414 ▲294.12 ▼0.22117.30 ▲15.3252.21 ▲10.52
Music Master /wp-admin/admin.php?page=spotify-master1,7678.00212.96108.16
Add-ons /wp-admin/admin.php?page=spotify-master-admin-addons1,0822.0526.6632.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_spotify_master_widget_buttons
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/spotify-master/includes/spotify-master-admin-addons.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/spotify-master/includes/spotify-master-admin-table-header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/spotify-master/includes/spotify-master-admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/spotify-master/includes/spotify-master-admin-table-news.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spotify-master/includes/spotify-master-widget-buttons.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/spotify-master/spotify-master.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/spotify-master/includes/spotify-master-admin-addons-table.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=spotify-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=spotify-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
    • > GET request to /wp-admin/admin.php?page=spotify-master
    • > Deprecation (warning) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/y8/r/VuJLQ4k-JC-.js?_nc_x=Ij3Wp8lg5Kz 271 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=spotify-master
    • > Console-api (severe) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/y8/r/VuJLQ4k-JC-.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

spotify-master/spotify-master.php 92% from 13 tests

The main PHP script in "TechGasp Music Master" version 5.1.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin494 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP92759494

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods9
▷ Static methods222.22%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.29MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/techgasp-admin-addons-support.png15.84KB14.85KB▼ 6.26%
images/techgasp-admin-addons-widgets.png17.08KB16.02KB▼ 6.22%
images/techgasp-admin-addons-updater.png14.03KB13.02KB▼ 7.21%
images/techgasp-hr.png0.94KB0.13KB▼ 86.60%
images/techgasp-check-yes.png22.22KB7.59KB▼ 65.83%