10% playlist-audio-player

Code Review | Playlist Audio Player

WordPress plugin Playlist Audio Player scored10%from 54 tests.

About plugin

  • Plugin page: playlist-audio-pl...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2015
  • Latest release: Jun 13, 2016
  • Number of updates: 13
  • Update frequency: every 17.2 days
  • Top authors: Dynaweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,996 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/playlist-audio-player/classes/database.php+23
    count(): Parameter must be an array or an object that implements Countable

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

Server-side resources used by Playlist Audio Player
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0439.99 ▼3.69
Dashboard /wp-admin3.40 ▲0.0651.56 ▲0.07
Posts /wp-admin/edit.php3.52 ▲0.1257.68 ▲1.75
Add New Post /wp-admin/post-new.php5.96 ▲0.0387.01 ▼19.12
Media Library /wp-admin/upload.php3.30 ▲0.0342.92 ▲7.74
Playlist Audio Player /wp-admin/admin.php?page=music_playlist3.3537.12

Server storage [IO: ▲1.99MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/playlist-audio-player/" and "wp-content/uploads/"
    • (new file) wp-content/playlist-audio-player/uploads/.empty
Filesystem: 50 new files
Database: 1 new table, 6 new options
New tables
wp_audio_tracklist
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Playlist Audio Player
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,101 ▲34016.18 ▲1.8319.86 ▲17.8445.81 ▲3.69
Dashboard /wp-admin2,362 ▲1826.44 ▲0.77120.98 ▲33.6937.52 ▼5.84
Posts /wp-admin/edit.php2,290 ▲1903.68 ▲1.6553.22 ▲10.9032.89 ▲0.52
Add New Post /wp-admin/post-new.php1,706 ▲17823.03 ▼0.10658.15 ▼39.4334.52 ▼20.38
Media Library /wp-admin/upload.php1,427 ▲274.44 ▲0.3094.95 ▼6.9949.71 ▲4.70
Playlist Audio Player /wp-admin/admin.php?page=music_playlist1,2523.4359.0925.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_audio_tracklist
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/playlist-audio-player/playlist-audio-player.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/playlist-audio-player/views/player.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/playlist-audio-player/admin/playlist.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/playlist-audio-player/classes/database.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/playlist-audio-player/classes/database.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/playlist-audio-player/admin/queries.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/playlist-audio-player/classes/track_class.php:2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/playlist-audio-player/classes/database.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=music_playlist
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=music_playlist 292:32 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Add Songs), #2 (create List), #3 (Playlist Audio Player on frontend.)
  • Tags: You are using too many tags: 16 tag instead of maximum 10
You can look at the official readme.txt

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

The main PHP script in "Playlist Audio Player" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 194 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .xap - Silverlight Application Package in Microsoft Silverlight
      • wp-content/plugins/playlist-audio-player/assets/js/pluploader/Moxie.xap
18,771 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript122,2593,14112,033
CSS61,4661255,625
PHP880115710
SVG100288
Markdown1320115

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.32MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png77.45KB25.20KB▼ 67.46%
screenshot-3.png99.33KB39.91KB▼ 59.82%
assets/screenshot-1.png50.22KB53.50KB0.00%
images/stop.PNG2.87KB0.33KB▼ 88.50%
images/shuffle.PNG3.40KB1.16KB▼ 65.79%