62% html5-jquery-audio-player

Code Review | HTML5 jQuery Audio Player

WordPress plugin HTML5 jQuery Audio Player scored 62% from 54 tests.

About plugin

  • Plugin page: html5-jquery-audi...
  • Plugin version: 2.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7.4
  • WordPress version: 6.3.1
  • First release: Jul 10, 2012
  • Latest release: May 9, 2017
  • Number of updates: 62
  • Update frequency: every 28.5 days
  • Top authors: EnigmaWeb (100%)

Code review

54 tests

User reviews

98 reviews

Install metrics

2,000+ active / 202,806 total downloads

Benchmarks

Plugin footprint 65% 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.05MB] [CPU: ▼2.04ms] Passed 4 tests

Analyzing server-side resources used by HTML5 jQuery Audio Player
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.84 ▼3.99
Dashboard /wp-admin3.35 ▲0.0548.19 ▼3.85
Posts /wp-admin/edit.php3.41 ▲0.0551.05 ▲4.99
Add New Post /wp-admin/post-new.php5.95 ▲0.0796.42 ▼0.01
Media Library /wp-admin/upload.php3.28 ▲0.0536.35 ▼0.31
Manage Songs /wp-admin/admin.php?page=hmp_palylist3.4232.81
/wp-admin/admin.php?page=hmp-options3.3034.54
Display Settings /wp-admin/admin.php?page=display_settings3.3033.98

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 52 new files
Database: 2 new tables, 9 new options
New tables
wp_hmp_rating
wp_hmp_playlist
New WordPress options
hmp_player_db_table_version
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
recovery_mode_email_last_sent
can_compress_scripts
hmp_player_db_table_rating_version

Browser metrics Passed 4 tests

HTML5 jQuery Audio Player: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲19813.61 ▼0.784.84 ▲3.0242.78 ▲0.13
Dashboard /wp-admin2,238 ▲534.95 ▲0.09109.76 ▼8.9281.68 ▲37.15
Posts /wp-admin/edit.php2,135 ▲462.23 ▲0.2536.62 ▲2.3134.80 ▲1.10
Add New Post /wp-admin/post-new.php1,554 ▲4018.32 ▲0.59636.37 ▼4.2456.07 ▲12.95
Media Library /wp-admin/upload.php1,430 ▲454.27 ▲0.1195.22 ▼7.3673.37 ▲31.75
Manage Songs /wp-admin/admin.php?page=hmp_palylist7041.557.0917.39
/wp-admin/admin.php?page=hmp-options1,1271.8227.0929.69
Display Settings /wp-admin/admin.php?page=display_settings1,1271.8424.8231.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_hmp_playlist
    • wp_hmp_rating
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • hmp_player_db_table_version
    • hmp_player_db_table_rating_version
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=hmp_palylist
    • > Error in wp-content/plugins/html5-jquery-audio-player/playlist/add_playlist.php+20
    Uncaught Error: Call to undefined function mysql_query() in wp-content/plugins/html5-jquery-audio-player/playlist/add_playlist.php:20
    Stack trace:
    #0 wp-content/plugins/html5-jquery-audio-player/index.php(62): include()
    #1 wp-includes/class-wp-hook.php(310): wp_hmp_playlist()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/html5-jquery-audio-player/includes/ttw-music-player.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/html5-jquery-audio-player/player/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html5-jquery-audio-player/includes/db-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/html5-jquery-audio-player/playlist/add_playlist.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: jquery player, html5 audio player, music player, ogg player, mp3...

html5-jquery-audio-player/index.php 92% from 13 tests

Analyzing the main PHP file in "HTML5 jQuery Audio Player" version 2.6.2
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("html5-jquery-audio-player.php" instead of "index.php")

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
There were no executable files found in this plugin4,579 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52641942,342
PHP5202571,771
CSS16224298
PO File17498168

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
25 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/player-previous-hover.png0.28KB0.29KB0.00%
includes/images/buy-bg.png0.11KB0.09KB▼ 15.65%
includes/images/player-pause-hover.png0.17KB0.17KB0.00%
includes/images/player-elapsed.png0.13KB0.10KB▼ 17.69%
includes/images/rating-bar.png0.11KB0.08KB▼ 29.06%