78% music-player-for-easy-digital-downloads

Code Review | Music Player for Easy Digital Downloads

WordPress plugin Music Player for Easy Digital Downloads scored78%from 54 tests.

About plugin

  • Plugin page: music-player-for-...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 23, 2020
  • Latest release: Oct 1, 2023
  • Number of updates: 99
  • Update frequency: every 13.6 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /16,028 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.31MB] [CPU: ▼0.53ms] Passed 4 tests

This is a short check of server-side resources used by Music Player for Easy Digital Downloads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3244.49 ▲3.28
Dashboard /wp-admin3.62 ▲0.3149.68 ▼4.64
Posts /wp-admin/edit.php3.73 ▲0.3754.16 ▲5.39
Add New Post /wp-admin/post-new.php6.20 ▲0.3196.86 ▼5.77
Media Library /wp-admin/upload.php3.54 ▲0.3138.82 ▲5.02

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
installed_music-player-for-easy-digital-downloads
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Music Player for Easy Digital Downloads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.17 ▼1.241.72 ▼0.3544.79 ▲3.31
Dashboard /wp-admin2,206 ▲185.83 ▼0.0596.91 ▼13.2139.69 ▼4.66
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0037.53 ▼1.8834.31 ▲0.15
Add New Post /wp-admin/post-new.php1,533 ▲1623.42 ▲5.60637.71 ▼11.5544.75 ▼19.08
Media Library /wp-admin/upload.php1,385 ▼64.23 ▲0.0595.36 ▼9.4646.19 ▲0.23

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • installed_music-player-for-easy-digital-downloads
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/music-player-for-easy-digital-downloads/views/global_options.php
    • > /wp-content/plugins/music-player-for-easy-digital-downloads/views/player_options.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/music-player-for-easy-digital-downloads/pagebuilders/siteorigin/siteorigin-eddmp/siteorigin-eddmp.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-player-for-easy-digital-downloads/banner.php:105
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/music-player-for-easy-digital-downloads/pagebuilders/beaverbuilder/eddmp/includes/frontend.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-player-for-easy-digital-downloads/widgets/playlist_widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-player-for-easy-digital-downloads/banner.php:105
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/music-player-for-easy-digital-downloads/pagebuilders/divi/divi.pb.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/music-player-for-easy-digital-downloads/pagebuilders/beaverbuilder/eddmp/eddmp.pb.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/music-player-for-easy-digital-downloads/pagebuilders/beaverbuilder/eddmp/eddmp.pb.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

music-player-for-easy-digital-downloads/eddmp.php 85% from 13 tests

The entry point to "Music Player for Easy Digital Downloads" version 1.1.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 235 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("music-player-for-easy-digital-downloads.php" instead of "eddmp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,585 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP152901202,457
JavaScript87242474
PO File1141157376
HTML110169
CSS58189
JSON10019
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity39.62
▷ Minimum class complexity1.00
▷ Maximum class complexity268.00
Average method complexity4.77
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods82
▷ Static methods33.66%
▷ Public methods5769.51%
▷ Protected methods22.44%
▷ Private methods2328.05%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
15 PNG files occupy 0.14MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/assets/skin1_btn.png0.46KB0.37KB▼ 19.74%
vendors/mejs-skins/controls-wmp.png5.38KB3.02KB▼ 43.93%
views/assets/skin3.png7.53KB3.10KB▼ 58.81%
feedback/screenshots/screen2.png12.18KB12.15KB0.29%
views/assets/skin2_btn.png0.69KB0.46KB▼ 33.94%