78% audio-envelope

Code Review | Audio Envelope

WordPress plugin Audio Envelope scored78%from 54 tests.

About plugin

  • Plugin page: audio-envelope
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: May 14, 2019
  • Latest release: Mar 19, 2021
  • Number of updates: 36
  • Update frequency: every 18.8 days
  • Top authors: 1000camels (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,162 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Audio Envelope
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0533.89 ▼7.88
Dashboard /wp-admin3.34 ▲0.0447.98 ▲0.26
Posts /wp-admin/edit.php3.40 ▲0.0441.26 ▼6.52
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.33 ▼10.17
Media Library /wp-admin/upload.php3.27 ▲0.0436.19 ▼2.33
Audio Envelope /wp-admin/options-general.php?page=audio-envelope3.2631.38

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 76 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
audio_envelope_plugin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Audio Envelope
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,016 ▲25515.24 ▲0.7133.78 ▲31.9444.32 ▲2.19
Dashboard /wp-admin2,206 ▲295.60 ▲0.0386.58 ▼6.0241.94 ▲4.32
Posts /wp-admin/edit.php2,108 ▲111.98 ▼0.0138.91 ▲1.1331.20 ▼8.50
Add New Post /wp-admin/post-new.php6,239 ▲4,71318.63 ▼4.40869.41 ▲236.2137.01 ▼10.71
Media Library /wp-admin/upload.php1,408 ▲84.14 ▼0.13101.15 ▲2.5441.99 ▼2.65
Audio Envelope /wp-admin/options-general.php?page=audio-envelope9752.0027.2829.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • audio_envelope_plugin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/audio-envelope/public/templates/ae-player-button.php
    • > /wp-content/plugins/audio-envelope/public/templates/ae-playlist-panel.php
    • > /wp-content/plugins/audio-envelope/public/partials/audio-envelope-public-display.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor_Audio_Envelope\\add_action() in wp-content/plugins/audio-envelope/elementor/init.php:85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/audio-envelope/admin/partials/audio-envelope-admin-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/audio-envelope/public/templates/ae-playlist-current-item.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/audio-envelope/public/templates/ae-playlist-item.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/audio-envelope/blocks/audio-envelope.php:66

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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Expanded full player and playlist for desktop) image missing
You can take inspiration from this readme.txt

audio-envelope/audio-envelope.php 92% from 13 tests

The entry point to "Audio Envelope" version 1.0.9 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 339 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected12,383 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
JSON3005,409
JavaScript176736893,131
CSS94221271,853
PHP213219611,140
HTML23528798
SVG160052

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.82
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods77
▷ Static methods56.49%
▷ Public methods6888.31%
▷ Protected methods45.19%
▷ Private methods56.49%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin