10% podcast-player-widget

Code Review | JPlayer Podcast Widget

WordPress plugin JPlayer Podcast Widget scored10%from 54 tests.

About plugin

  • Plugin page: podcast-player-wi...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Feb 4, 2016
  • Latest release: May 25, 2016
  • Number of updates: 12
  • Update frequency: every 9.3 days
  • Top authors: freegod725 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,671 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
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/podcast-player-widget/plugin.php+292
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼51.04ms] Passed 4 tests

An overview of server-side resources used by JPlayer Podcast Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.79 ▼35.08
Dashboard /wp-admin2.10 ▼1.206.28 ▼43.08
Posts /wp-admin/edit.php2.10 ▼1.255.88 ▼43.68
Add New Post /wp-admin/post-new.php2.10 ▼3.797.08 ▼82.32
Media Library /wp-admin/upload.php2.10 ▼1.137.38 ▼27.52

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 71 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_jplayer-podcast
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for JPlayer Podcast Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲12313.45 ▼0.759.81 ▲8.1741.48 ▼0.73
Dashboard /wp-admin2,199 ▲225.55 ▼0.1084.32 ▼4.1839.15 ▼5.34
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0138.94 ▼3.4338.33 ▲2.37
Add New Post /wp-admin/post-new.php1,408 ▼12018.61 ▼4.47679.91 ▲23.1457.00 ▲5.77
Media Library /wp-admin/upload.php1,404 ▲14.17 ▼0.0798.75 ▼3.5742.70 ▼3.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/podcast-player-widget/plugin.php+292
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_jplayer-podcast
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/podcast-player-widget/assets/podparser.php
  • 30× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to get property 'image' of non-object in wp-content/plugins/podcast-player-widget/assets/podparser.php on line 12
    • > PHP Notice
      Undefined index: callback in wp-content/plugins/podcast-player-widget/assets/podparser.php on line 60
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/podcast-player-widget/assets/podparser.php on line 7
    • > PHP Notice
      Trying to get property 'channel' of non-object in wp-content/plugins/podcast-player-widget/assets/podparser.php on line 17
    • > PHP Notice
      Trying to get property 'author' of non-object in wp-content/plugins/podcast-player-widget/assets/podparser.php on line 17
    • > PHP Notice
      Trying to get property 'url' of non-object in wp-content/plugins/podcast-player-widget/assets/podparser.php on line 14
    • > PHP Notice
      Undefined variable: widgetId in wp-content/plugins/podcast-player-widget/views/widget.php on line 14
    • > PHP Notice
      Trying to get property 'channel' of non-object in wp-content/plugins/podcast-player-widget/assets/podparser.php on line 12
    • > PHP Notice
      Undefined variable: widgetId in wp-content/plugins/podcast-player-widget/views/widget.php on line 12
    • > PHP Notice
      Undefined variable: widgetId in wp-content/plugins/podcast-player-widget/views/widget.php on line 48

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Widget Settings) image not found
The official readme.txt is a good inspiration

podcast-player-widget/plugin.php 85% from 13 tests

"JPlayer Podcast Widget" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("podcast-player-widget.php" instead of "plugin.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
Good job! No executable or dangerous file extensions detected7,084 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript134014924,300
CSS82331091,186
HTML11182654
LESS14170132576
PHP490112257
JSON20096
Markdown18015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.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

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jplayer/skin/blue.monday/image/jplayer.blue.monday.video.play.png17.28KB4.28KB▼ 75.21%
screenshot-1.png25.41KB6.17KB▼ 75.71%
jplayer/skin/pixels/images/bg-shadow.png91.61KB57.75KB▼ 36.95%
jplayer/skin/pink.flag/image/jplayer.pink.flag.video.play.png17.28KB4.28KB▼ 75.21%