78% trancelantic-playlist

Code Review | Trancelantic Playlist

WordPress plugin Trancelantic Playlist scored78%from 54 tests.

About plugin

  • Plugin page: trancelantic-play...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.6.0
  • WordPress version: 6.3.1
  • First release: Jan 21, 2020
  • Latest release: Feb 2, 2021
  • Number of updates: 20
  • Update frequency: every 19.0 days
  • Top authors: wilfriedkatschmarz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,081 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.15ms] Passed 4 tests

Server-side resources used by Trancelantic Playlist
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.92 ▼1.36
Dashboard /wp-admin3.34 ▼0.0144.61 ▼22.11
Posts /wp-admin/edit.php3.39 ▲0.0351.48 ▲6.76
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.05 ▼7.92
Media Library /wp-admin/upload.php3.26 ▲0.0335.12 ▼1.19

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

A short overview of filesystem and database impact
Please fix the following
  • There were 4 files (0.00KB) illegally modified outside of "wp-content/plugins/trancelantic-playlist/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/trancelantic-playlist/assets/banner-772\303\227250.png"
    • (new file) "wp-content/plugins/trancelantic-playlist/assets/icon-256\303\227256.png"
    • (new file) "wp-content/plugins/trancelantic-playlist/assets/icon-128\303\227128.png"
    • (new file) "wp-content/plugins/trancelantic-playlist/assets/banner-1544\303\227500.png"
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_tlpl_playlist_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Trancelantic Playlist: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6813.15 ▼1.141.69 ▼0.0543.70 ▼4.42
Dashboard /wp-admin2,206 ▲185.85 ▲0.96106.04 ▼15.7741.20 ▼5.02
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0138.71 ▲3.2835.27 ▼3.24
Add New Post /wp-admin/post-new.php1,537 ▲423.12 ▲0.01683.08 ▼0.2651.86 ▲4.04
Media Library /wp-admin/upload.php1,385 ▼64.22 ▲0.0294.94 ▼12.7043.49 ▼1.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_tlpl_playlist_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 9× PHP files output text when accessed directly:
    • > /wp-content/plugins/trancelantic-playlist/trancelantic-playlist.php
    • > /wp-content/plugins/trancelantic-playlist/views/css.php
    • > /wp-content/plugins/trancelantic-playlist/views/cover-gallery.php
    • > /wp-content/plugins/trancelantic-playlist/views/current-track.php
    • > /wp-content/plugins/trancelantic-playlist/views/track-list.php
    • > /wp-content/plugins/trancelantic-playlist/widgets/playlist.php
    • > /wp-content/plugins/trancelantic-playlist/core/functions.php
    • > /wp-content/plugins/trancelantic-playlist/channels/last-fm-channel.php
    • > /wp-content/plugins/trancelantic-playlist/views/single-track.php
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: track_list in wp-content/plugins/trancelantic-playlist/views/cover-gallery.php on line 5
    • > PHP Notice
      Undefined variable: track in wp-content/plugins/trancelantic-playlist/views/single-track.php on line 16
    • > PHP Notice
      Undefined variable: track in wp-content/plugins/trancelantic-playlist/views/single-track.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/trancelantic-playlist/views/single-track.php on line 21
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/trancelantic-playlist/views/single-track.php on line 11
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/trancelantic-playlist/views/cover-gallery.php on line 5
    • > PHP Warning
      include(): Failed opening 'TLPL_PATH/views/single-track.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/trancelantic-playlist/views/current-track.php on line 5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/trancelantic-playlist/views/admin-title.php:3
    • > PHP Warning
      include(TLPL_PATH/views/single-track.php): failed to open stream: No such file or directory in wp-content/plugins/trancelantic-playlist/views/current-track.php on line 5
    • > PHP Warning
      Use of undefined constant TLPL_PATH - assumed 'TLPL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/trancelantic-playlist/views/current-track.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: currently_played_songs, spotify, playlist, scrobbling, lastfm...

trancelantic-playlist/trancelantic-playlist.php Passed 13 tests

"Trancelantic Playlist" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
76 characters long description:
Trancelantic Playlist shows your currently played song of your media player.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected615 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1310280487
PO File34864128

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity6.00
▷ Maximum class complexity16.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods758.33%
▷ Protected methods00.00%
▷ Private methods541.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 3.85MB with 2.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png63.00KB21.24KB▼ 66.28%
assets/screenshot-2.png909.18KB226.88KB▼ 75.05%
assets/icon-256×256.png85.18KB27.77KB▼ 67.40%
assets/screenshot-4.png652.08KB156.42KB▼ 76.01%
assets/banner-1544×500.png686.12KB181.59KB▼ 73.53%