10% rotate-soundcloud-player

Code Review | Rotate Soundcloud Player

WordPress plugin Rotate Soundcloud Player scored10%from 54 tests.

About plugin

  • Plugin page: rotate-soundcloud...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.6
  • WordPress version: 6.3.1
  • First release: Dec 27, 2014
  • Latest release: Jul 29, 2016
  • Number of updates: 13
  • Update frequency: every 44.8 days
  • Top authors: gavinr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,415 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/rotate-soundcloud-player/plugin.php+328
    Function create_function() is deprecated

Server metrics [RAM: ▼1.90MB] [CPU: ▼55.98ms] Passed 4 tests

Analyzing server-side resources used by Rotate Soundcloud Player
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.87 ▼39.54
Dashboard /wp-admin2.11 ▼1.206.59 ▼45.12
Posts /wp-admin/edit.php2.11 ▼1.255.35 ▼45.09
Add New Post /wp-admin/post-new.php2.11 ▼3.786.02 ▼94.16
Media Library /wp-admin/upload.php2.11 ▼1.125.63 ▼30.46

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Rotate Soundcloud Player
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.42 ▼0.958.06 ▲6.2238.68 ▼6.58
Dashboard /wp-admin2,199 ▲255.56 ▲0.0396.01 ▼3.5241.10 ▼0.38
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0235.31 ▼3.1234.87 ▼4.85
Add New Post /wp-admin/post-new.php1,530 ▲423.52 ▲0.12684.19 ▲57.4452.30 ▲0.79
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.02105.69 ▼0.3243.94 ▼1.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/rotate-soundcloud-player/plugin.php+328
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_rotate-soundcloud-player
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/rotate-soundcloud-player/views/widget.php
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: client_id in wp-content/plugins/rotate-soundcloud-player/views/widget.php on line 11
    • > PHP Notice
      Undefined variable: show_favoritings_count in wp-content/plugins/rotate-soundcloud-player/views/widget.php on line 129
    • > PHP Notice
      Undefined variable: playlist in wp-content/plugins/rotate-soundcloud-player/views/widget.php on line 19
    • > PHP Notice
      Undefined variable: soundcloud_url in wp-content/plugins/rotate-soundcloud-player/views/widget.php on line 186
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/rotate-soundcloud-player/views/widget.php on line 167
    • > PHP Notice
      Undefined variable: show_download_count in wp-content/plugins/rotate-soundcloud-player/views/widget.php on line 118
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/rotate-soundcloud-player/views/admin.php:4
    • > PHP Notice
      Undefined variable: playlist in wp-content/plugins/rotate-soundcloud-player/views/widget.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/rotate-soundcloud-player/views/widget.php:186
    • > PHP Notice
      Undefined variable: show_play_count in wp-content/plugins/rotate-soundcloud-player/views/widget.php on line 107

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: podcast, soundcloud, player

rotate-soundcloud-player/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Rotate Soundcloud Player" version 1.1
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rotate-soundcloud-player.php" instead of "plugin.php")

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
Success! There were no dangerous files found in this plugin485 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3100135348
CSS2411110
PO File10017
JavaScript20210

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/images/soundcloud.png1.59KB1.56KB▼ 2.08%