90% play-audio-once

Code Review | Play Audio Once

WordPress plugin Play Audio Once scored90%from 54 tests.

About plugin

  • Plugin page: play-audio-once
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2022
  • Latest release: Nov 26, 2023
  • Number of updates: 13
  • Update frequency: every 48.8 days
  • Top authors: threadi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,128 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.09ms] Passed 4 tests

Analyzing server-side resources used by Play Audio Once
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.72 ▼3.28
Dashboard /wp-admin3.31 ▲0.0048.80 ▼3.03
Posts /wp-admin/edit.php3.36 ▲0.0049.44 ▲0.03
Add New Post /wp-admin/post-new.php7.17 ▲1.2896.15 ▲4.34
Media Library /wp-admin/upload.php3.23 ▲0.0035.78 ▲1.93

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Play Audio Once
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,037 ▲27520.90 ▲6.67148.20 ▲146.4542.81 ▼1.81
Dashboard /wp-admin2,195 ▲155.54 ▼0.1391.51 ▼4.7142.16 ▲0.83
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0339.55 ▼4.6236.30 ▼4.52
Add New Post /wp-admin/post-new.php1,528 ▲224.27 ▲1.08583.95 ▼20.6033.83 ▼23.17
Media Library /wp-admin/upload.php1,403 ▼04.17 ▲0.0397.90 ▲3.4841.91 ▼1.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 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 Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: play audio once, audio

play-audio-once/play-audio-once.php Passed 13 tests

The main PHP script in "Play Audio Once" version 1.1.3 is automatically included on every request by WordPress
87 characters long description:
Adds an option to the audio block to prevent the file from being played multiple times.

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
Everything looks great! No dangerous files found in this plugin377 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42574209
PO File42432126
PHP463537
JSON5005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No 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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin