79% dj-player

Code Review | DJ Player

WordPress plugin DJ Player scored79%from 54 tests.

About plugin

  • Plugin page: dj-player
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Oct 16, 2017
  • Latest release: Oct 16, 2017
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: veradeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,681 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
Install script ran successfully

Server metrics [RAM: ▼0.18MB] [CPU: ▼20.80ms] Passed 4 tests

Server-side resources used by DJ Player
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0229.63 ▼9.53
Dashboard /wp-admin3.12 ▼0.2225.14 ▼38.04
Posts /wp-admin/edit.php3.26 ▼0.1034.44 ▼11.04
Add New Post /wp-admin/post-new.php5.50 ▼0.3870.89 ▼24.60
Media Library /wp-admin/upload.php3.21 ▼0.0227.45 ▼5.53
General Settings /wp-admin/edit.php?post_type=djsong&page=djpr_main_settings3.1126.29
All Songs /wp-admin/edit.php?post_type=djsong3.2331.22
Add Song /wp-admin/post-new.php?post_type=djsong3.2832.43

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for DJ Player
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,044 ▲29814.53 ▲0.3217.04 ▲15.2940.20 ▼0.72
Dashboard /wp-admin2,272 ▲805.09 ▲0.16110.57 ▲7.0044.63 ▲2.63
Posts /wp-admin/edit.php2,154 ▲652.33 ▲0.1541.21 ▲1.2734.38 ▼0.22
Add New Post /wp-admin/post-new.php1,575 ▲4218.00 ▼5.32605.87 ▼22.5633.96 ▼15.22
Media Library /wp-admin/upload.php1,448 ▲664.45 ▲0.2796.27 ▼4.7241.73 ▼2.92
General Settings /wp-admin/edit.php?post_type=djsong&page=djpr_main_settings9812.5641.6227.36
All Songs /wp-admin/edit.php?post_type=djsong1,1242.2733.4227.75
Add Song /wp-admin/post-new.php?post_type=djsong1,5112.7752.9231.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=djsong
    • > Notice in wp-content/plugins/dj-player/dj-player.php+16
    Trying to access array offset on value of type bool
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=djsong
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
    • > GET request to /wp-admin/post-new.php?post_type=djsong
    • > Notice in wp-content/plugins/dj-player/dj-player.php+206
    Undefined variable: html

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant DJPR_PLUGIN_URL - assumed 'DJPR_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/dj-player/front-player.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dj-player/dj-player.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dj-player/front-player.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
6 plugin tags: audio, responsive, mp3, music, audio player...

dj-player/dj-player.php Passed 13 tests

"DJ Player" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
45 characters long description:
Fully responsive music player with tracklist.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,986 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71531431,038
CSS513812620
PHP25115308
SVG10020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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
1 PNG file occupies 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/cover.png78.20KB45.47KB▼ 41.86%