78% mlr-audio

Code Review | ML Responsive Audio player with playlist Shortcode

WordPress plugin ML Responsive Audio player with playlist Shortcode scored78%from 54 tests.

About plugin

  • Plugin page: mlr-audio
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 30, 2014
  • Latest release: Jan 12, 2018
  • Number of updates: 31
  • Update frequency: every 46.6 days
  • Top authors: ersatzpole (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /4,957 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼16.57ms] Passed 4 tests

This is a short check of server-side resources used by ML Responsive Audio player with playlist Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1642.43 ▼5.29
Dashboard /wp-admin3.41 ▲0.1036.57 ▼18.06
Posts /wp-admin/edit.php3.47 ▲0.1239.98 ▼13.49
Add New Post /wp-admin/post-new.php5.66 ▼0.2384.57 ▼29.42
Media Library /wp-admin/upload.php3.41 ▲0.1835.98 ▼1.19
MLR Audio /wp-admin/options-general.php?page=mlag3.3934.32
Audio Elements /wp-admin/edit.php?post_type=ml_audio3.4538.01
Audio Category /wp-admin/edit-tags.php?taxonomy=audio_category&post_type=ml_audio3.4029.80
Add New /wp-admin/post-new.php?post_type=ml_audio3.4747.56

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 7 new options
New WordPress options
mlag
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by ML Responsive Audio player with playlist Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲20114.31 ▼0.0615.71 ▲13.7436.80 ▼4.85
Dashboard /wp-admin2,236 ▲595.66 ▲0.0890.51 ▼1.5938.98 ▼6.94
Posts /wp-admin/edit.php2,141 ▲412.02 ▼0.0239.46 ▲1.9634.48 ▲1.20
Add New Post /wp-admin/post-new.php1,561 ▲3323.17 ▲0.12646.62 ▼9.4866.29 ▲8.55
Media Library /wp-admin/upload.php1,444 ▲444.25 ▲0.0898.00 ▼5.6943.06 ▼2.31
MLR Audio /wp-admin/options-general.php?page=mlag2,2183.4795.7029.14
Audio Elements /wp-admin/edit.php?post_type=ml_audio1,1762.0032.8530.88
Audio Category /wp-admin/edit-tags.php?taxonomy=audio_category&post_type=ml_audio1,3122.1625.2327.46
Add New /wp-admin/post-new.php?post_type=ml_audio1,8953.7566.6030.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • mlag
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ml_audio
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

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
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mlr-audio/inc/audio_custom_style.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mlr-audio/inc/options.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/mlr-audio/mlr-audio.php:70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mlr-audio/inc/audio.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #2, #3 in mlr-audio/assets to your readme.txt
Please take inspiration from this readme.txt

mlr-audio/mlr-audio.php Passed 13 tests

The main PHP script in "ML Responsive Audio player with playlist Shortcode" version 0.2 is automatically included on every request by WordPress
69 characters long description:
This plugin provides an HTML5 Audio player for your wordpress theme..

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 detected5,855 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
CSS523231,642
JavaScript7237741,417
Sass131922928
LESS121827907
PHP4191152547
SVG100414

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/direction_grey.png1.56KB1.37KB▼ 12.62%
css/images/volume.png0.67KB0.69KB0.00%
css/images/direction.png1.55KB1.41KB▼ 8.99%
css/images/volume_half.png0.56KB0.55KB▼ 1.22%
css/images/volume_grey.png0.42KB0.41KB▼ 1.87%