67% html5-audio-player

Code Review | Html5 Audio Player - Audio Player for WordPress

WordPress plugin Html5 Audio Player - Audio Player for WordPress scored67%from 54 tests.

About plugin

  • Plugin page: html5-audio-player
  • Plugin version: 2.2.16
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 11, 2015
  • Latest release: Nov 22, 2023
  • Number of updates: 170
  • Update frequency: every 17.3 days
  • Top authors: abuhayat (74.12%)shehabulislam (26.47%)

Code review

54 tests

User reviews

160 reviews

Install metrics

10,000+ active /243,198 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.36MB] [CPU: ▲40.99ms] 75% from 4 tests

An overview of server-side resources used by Html5 Audio Player - Audio Player for WordPress
Please have a look at the following items
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.36MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.93 ▲5.4679.27 ▲39.37
Dashboard /wp-admin8.95 ▲5.6496.31 ▲45.78
Posts /wp-admin/edit.php8.95 ▲5.5885.98 ▲36.21
Add New Post /wp-admin/post-new.php10.66 ▲4.77140.01 ▲43.38
Media Library /wp-admin/upload.php8.95 ▲5.7181.33 ▲45.01
Upgrade /wp-admin/admin.php?page=audio-player-pricing-manual8.9570.74
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius8.9566.85

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 504 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_recent-comments
fs_accounts
widget_theysaidso_widget
fs_active_plugins
db_upgraded
fs_debug_mode
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Html5 Audio Player - Audio Player for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲20913.83 ▼0.521.84 ▲0.2435.97 ▼7.57
Dashboard /wp-admin2,311 ▲1335.34 ▼0.38114.53 ▲2.1497.71 ▲52.15
Posts /wp-admin/edit.php2,235 ▲1322.44 ▲0.4440.15 ▲0.5362.15 ▲24.44
Add New Post /wp-admin/post-new.php6,554 ▲5,02829.78 ▲6.47924.31 ▲247.8161.89 ▲7.36
Media Library /wp-admin/upload.php1,522 ▲1224.91 ▲0.70115.27 ▲18.9192.20 ▲50.30
Upgrade /wp-admin/admin.php?page=audio-player-pricing-manual1,7483.4379.86134.26
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1262.1629.8842.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/html5-audio-player/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • fs_accounts
    • fs_debug_mode
    • fs_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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 items
  • 26× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Base_Data_Control' not found in wp-content/plugins/html5-audio-player/inc/Elementor/Controls/Radio.php:10
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin-install.php): failed to open stream: No such file or directory in wp-content/plugins/html5-audio-player/admin/global/free-plugin-list.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/html5-audio-player/shortcode/player.php:38
    • > PHP Warning
      Use of undefined constant H5AP_PRO_VERSION - assumed 'H5AP_PRO_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/html5-audio-player/blocks/audioplayer/blocks.asset.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html5-audio-player/admin/global/help-usages.php:6
    • > PHP Warning
      Use of undefined constant H5AP_PRO_VERSION - assumed 'H5AP_PRO_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/html5-audio-player/dist/blocks.asset.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/html5-audio-player/inc/Template/search.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/html5-audio-player/shortcode/single_button.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'H5APPlayer\\Helper\\Functions' not found in wp-content/plugins/html5-audio-player/shortcode/player/opt-1.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function H5APPlayer\\Base\\h5ap_fs() in wp-content/plugins/html5-audio-player/inc/Base/BlackFriday.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=audio-player-pricing-manual
    • > Security (severe) in unknown
    https://js.freemius.com/vendors/nojquery.ba-postmessage.min.js?v=180 11 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://borrowhome.s4-tastewp.com') does not match the recipient window's origin ('').

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: player, audio, audio player, html5 player, mp3 player

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

The entry point to "Html5 Audio Player - Audio Player for WordPress" version 2.2.16 is a PHP file that has certain tags in its header comment area
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

Code Analysis 97% from 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 plugin74,665 lines of code in 392 files:
LanguageFilesBlank linesComment linesLines of code
PHP26412,44920,37953,961
PO File203,1973,5946,534
Sass1592834,730
CSS303105564,586
JavaScript261,3144234,300
JSON600314
SVG31015240

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity41.83
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces12
Interfaces1
Traits0
Classes151
▷ Abstract classes42.65%
▷ Concrete classes14797.35%
▷ Final classes42.72%
Methods1,753
▷ Static methods27515.69%
▷ Public methods1,33376.04%
▷ Protected methods352.00%
▷ Private methods38521.96%
Functions158
▷ Named functions14793.04%
▷ Anonymous functions116.96%
Constants162
▷ Global constants10363.58%
▷ Class constants5936.42%
▷ Public constants59100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icn.png3.76KB1.19KB▼ 68.35%
dist/src/img/sound-control.png1.48KB1.33KB▼ 9.78%
(invalid) dist/fb16ee5f9cd5708b1d95.png0.07KB0.00KB▼ 100.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
admin/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%