83% audio-player-by-widgetic

Code Review | Audio Player

WordPress plugin Audio Player scored83%from 54 tests.

About plugin

  • Plugin page: audio-player-by-w...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0
  • WordPress version: 6.3.1
  • First release: Jun 15, 2022
  • Latest release: Jul 4, 2022
  • Number of updates: 6
  • Update frequency: every 3.2 days
  • Top authors: widgetic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /323 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.91MB] [CPU: ▲798.91ms] 75% from 4 tests

Server-side resources used by Audio Player
It is recommended to improve the following
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 798.91ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /4.44 ▲0.98818.87 ▲775.32
Dashboard /wp-admin4.46 ▲1.161,130.30 ▲1,074.88
Posts /wp-admin/edit.php4.47 ▲1.11765.21 ▲715.98
Add New Post /wp-admin/post-new.php6.27 ▲0.39719.69 ▲629.44
Media Library /wp-admin/upload.php4.47 ▲1.241,793.31 ▲1,755.52

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widgetic/secret
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Audio Player
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /5,009 ▲2,26335.50 ▲21.15116.03 ▲114.2433.05 ▼12.93
Dashboard /wp-admin3,581 ▲1,39617.51 ▲11.55291.00 ▲181.9881.05 ▲42.77
Posts /wp-admin/edit.php3,380 ▲1,29112.27 ▲10.28173.55 ▲133.1639.46 ▲0.25
Add New Post /wp-admin/post-new.php2,689 ▲1,17540.42 ▲16.93841.14 ▲182.7842.00 ▼10.88
Media Library /wp-admin/upload.php1,778 ▲39015.91 ▲11.67328.39 ▲225.2043.23 ▼3.62

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widgetic/secret
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: blockPath in wp-content/plugins/audio-player-by-widgetic/block.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/audio-player-by-widgetic/dashboard.php:4
    • > PHP Notice
      Undefined variable: blockWidgetId in wp-content/plugins/audio-player-by-widgetic/block.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/audio-player-by-widgetic/block.php:111
    • > PHP Notice
      Undefined variable: widgetMeta in wp-content/plugins/audio-player-by-widgetic/block.php on line 29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 32 tag instead of maximum 10
You can take inspiration from this readme.txt

audio-player-by-widgetic/index.php 92% from 13 tests

"Audio Player" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("audio-player-by-widgetic.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin3,316 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON5002,696
CSS37458432
PHP43155170
SVG10016
JavaScript2012

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions00.00%
▷ Anonymous functions11100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 3.23MB with 1.82MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png884.04KB280.74KB▼ 68.24%
assets/screenshot-2.png548.06KB195.36KB▼ 64.35%
assets/thumb.png1.44KB0.50KB▼ 64.99%
assets/icon.png1.38KB0.69KB▼ 50.21%
assets/icon_audio.png0.59KB0.39KB▼ 33.61%