84% wavesurfer-audio-player-block

Code Review | Wavesurfer Audio Player block

WordPress plugin Wavesurfer Audio Player block scored84%from 54 tests.

About plugin

  • Plugin page: wavesurfer-audio-...
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.5
  • WordPress version: 6.3.1
  • First release: Nov 5, 2020
  • Latest release: Nov 5, 2020
  • Number of updates: 3
  • Update frequency: every 7.0 days
  • Top authors: robcruiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /429 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Wavesurfer Audio Player block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.26 ▼1.86
Dashboard /wp-admin3.33 ▲0.0343.18 ▼10.36
Posts /wp-admin/edit.php3.38 ▲0.0245.94 ▲0.47
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.51 ▲1.70
Media Library /wp-admin/upload.php3.25 ▲0.0235.45 ▼0.04

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Wavesurfer Audio Player block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.71 ▼0.677.72 ▲5.7939.73 ▼9.18
Dashboard /wp-admin2,203 ▲155.83 ▼0.0799.80 ▼11.4738.64 ▼13.52
Posts /wp-admin/edit.php2,089 ▲32.03 ▼0.0737.18 ▼1.3634.61 ▲1.01
Add New Post /wp-admin/post-new.php6,424 ▲4,90520.97 ▼2.11898.71 ▲221.8737.71 ▼10.44
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0496.59 ▼12.7740.59 ▼7.10

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WavesurferAudioPlayer\\add_action() in wp-content/plugins/wavesurfer-audio-player-block/lib/meta-boxes.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WavesurferAudioPlayer\\add_action() in wp-content/plugins/wavesurfer-audio-player-block/lib/enqueue-scripts.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: block

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

The principal PHP file in "Wavesurfer Audio Player block" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wavesurfer-audio-player-block.php" instead of "ws-audio-player.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected2,376 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
TypeScript51111691,054
JavaScript3952185799
JSON300142
CSS352117
PHP42659108
SVG10176
PO File15536
Markdown110023
Sass16021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
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
Namespaces1
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%
Functions7
▷ Named functions7100.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
No PNG files were detected