84% audio-on-every-block

Code Review | Audio on every block

WordPress plugin Audio on every block scored84%from 54 tests.

About plugin

  • Plugin page: audio-on-every-block
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Mar 12, 2022
  • Latest release: Oct 21, 2023
  • Number of updates: 13
  • Update frequency: every 45.3 days
  • Top authors: threadi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /468 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼1.60ms] Passed 4 tests

An overview of server-side resources used by Audio on every block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.26 ▼1.45
Dashboard /wp-admin3.32 ▼0.0344.74 ▼14.35
Posts /wp-admin/edit.php3.37 ▲0.0147.39 ▲5.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.00 ▲9.61
Media Library /wp-admin/upload.php3.24 ▲0.0134.57 ▲4.14
Audio on every Block Settings /wp-admin/options-general.php?page=audio_on_every_block3.2130.31

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Audio on every block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4314.61 ▼0.041.68 ▼0.0338.53 ▼11.93
Dashboard /wp-admin2,199 ▲225.56 ▼0.0183.41 ▼4.6639.82 ▲1.05
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0038.81 ▲4.8036.01 ▼5.68
Add New Post /wp-admin/post-new.php1,540 ▲518.39 ▲0.30658.42 ▲5.8278.73 ▲9.01
Media Library /wp-admin/upload.php1,404 ▲44.24 ▲0.03108.56 ▲15.8349.74 ▲10.89
Audio on every Block Settings /wp-admin/options-general.php?page=audio_on_every_block8131.9923.9527.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/audio-on-every-block/templates/audio-on-every-block.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/audio-on-every-block/admin/admin.php:38

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: audio block, audio

audio-on-every-block/audio-on-every-block.php Passed 13 tests

The principal PHP file in "Audio on every block" v. 1.1.3 is loaded by WordPress automatically on each request
67 characters long description:
Adds the possibility to add an audio-file for each Gutenberg-Block.

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
There were no executable files found in this plugin193 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP52496158
PO File191233
JSON1001
JavaScript1001

PHP code Passed 2 tests

A short 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.31
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
There are no PNG files in this plugin