83% audio-player-block

Code Review | Audio Player Block

WordPress plugin Audio Player Block scored83%from 54 tests.

About plugin

  • Plugin page: audio-player-block
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 28, 2021
  • Latest release: Oct 3, 2023
  • Number of updates: 24
  • Update frequency: every 26.8 days
  • Top authors: charlescormier (79.17%)abuhayat (16.67%)srabonr (12.5%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /13,883 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Audio Player Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0344.27 ▼0.95
Dashboard /wp-admin3.33 ▲0.0254.30 ▼6.21
Posts /wp-admin/edit.php3.38 ▲0.0250.48 ▼5.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.35 ▼17.23
Media Library /wp-admin/upload.php3.25 ▲0.0245.92 ▲4.38

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Audio Player Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.351.63 ▼0.6047.28 ▲0.40
Dashboard /wp-admin2,195 ▲185.62 ▼0.0188.17 ▼17.8535.43 ▼10.40
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0139.48 ▲0.3736.46 ▲0.01
Add New Post /wp-admin/post-new.php6,366 ▲4,84027.67 ▲4.14916.56 ▲280.2753.42 ▲1.94
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.07102.34 ▼5.0745.59 ▲1.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant BPMP_VERSION - assumed 'BPMP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/audio-player-block/dist/editor.asset.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/audio-player-block/inc/block.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Requires at least: Invalid version format
The official readme.txt might help

audio-player-block/plugin.php 85% from 13 tests

The main PHP script in "Audio Player Block" version 1.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("audio-player-block.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin217 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP4211280
PO File1254468
JSON20065
CSS2022
JavaScript2022

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin