62% audio-playlist-for-woocommerce

Code Review | Audio Playlist for Woocommerce

WordPress plugin Audio Playlist for Woocommerce scored62%from 54 tests.

About plugin

  • Plugin page: audio-playlist-fo...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 28, 2020
  • Latest release: Apr 10, 2023
  • Number of updates: 12
  • Update frequency: every 89.8 days
  • Top authors: joanrodas (66.67%)sirvelia (41.67%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /662 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲2.93MB] [CPU: ▲15.24ms] Passed 4 tests

This is a short check of server-side resources used by Audio Playlist for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /7.37 ▲3.9071.41 ▲32.50
Dashboard /wp-admin6.24 ▲2.8965.01 ▲6.16
Posts /wp-admin/edit.php6.35 ▲2.9973.54 ▲26.93
Add New Post /wp-admin/post-new.php8.84 ▲2.9498.47 ▼0.41
Media Library /wp-admin/upload.php6.14 ▲2.9063.88 ▲28.26
Audio Playlist /wp-admin/admin.php?page=apfw-options6.1655.52

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2,133 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
_apfw_background_color
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Audio Playlist for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,330 ▲56918.99 ▲4.347.34 ▲5.8745.89 ▲3.51
Dashboard /wp-admin2,419 ▲2429.02 ▲3.45208.68 ▲120.8241.52 ▼2.96
Posts /wp-admin/edit.php2,357 ▲2576.21 ▲4.2182.16 ▲45.2733.00 ▼3.53
Add New Post /wp-admin/post-new.php1,602 ▲7619.86 ▼3.82711.82 ▲17.0652.56 ▲0.85
Media Library /wp-admin/upload.php1,490 ▲876.63 ▲2.38128.50 ▲16.9644.81 ▼2.42
Audio Playlist /wp-admin/admin.php?page=apfw-options1,1717.12104.5635.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/audio-playlist-for-woocommerce/audio-playlist-for-woocommerce.php
    • > /wp-content/plugins/audio-playlist-for-woocommerce/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 382× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Support\\Arrayable' not found in wp-content/plugins/audio-playlist-for-woocommerce/vendor/illuminate/support/Fluent.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon\\AbstractTranslator' not found in wp-content/plugins/audio-playlist-for-woocommerce/vendor/nesbot/carbon/lazy/Carbon/TranslatorWeakType.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/audio-playlist-for-woocommerce/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Parent_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/audio-playlist-for-woocommerce/vendor/illuminate/support/Facades/Log.php:25
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/audio-playlist-for-woocommerce/vendor/htmlburger/carbon-fields/templates/Container/user_meta.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/audio-playlist-for-woocommerce/vendor/htmlburger/carbon-fields/core/Field/Broken_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/audio-playlist-for-woocommerce/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\BadMethodCallException' not found in wp-content/plugins/audio-playlist-for-woocommerce/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php:17
    • > PHP Fatal error
      Trait 'Carbon\\Traits\\IntervalRounding' not found in wp-content/plugins/audio-playlist-for-woocommerce/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php on line 27
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Exception\\LogicException' not found in wp-content/plugins/audio-playlist-for-woocommerce/vendor/symfony/translation/Exception/UnsupportedSchemeException.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=apfw-options
    • > Console-api (warning) in wp-content/plugins/audio-playlist-for-woocommerce/vendor/htmlburger/carbon-fields/build/classic/vendor.min.js?ver=3.6.0+48:54975
    wp.compose.withState is deprecated since version 5.8. Please use wp.element.useState instead.

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: playlist, music, player, woocommerce, samples...

audio-playlist-for-woocommerce/audio-playlist-for-woocommerce.php Passed 13 tests

The main PHP script in "Audio Playlist for Woocommerce" version 1.1.1 is automatically included on every request by WordPress
52 characters long description:
Audio player with playlist for WooCommerce products.

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/audio-playlist-for-woocommerce/vendor/nesbot/carbon/bin/carbon.bat
97,137 lines of code in 1,859 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,54815,10251,12867,744
JavaScript1727,09410,91416,169
JSON28002,985
XSD392482,803
CSS82401,1572,222
Sass5036911,889
PO File206137821,660
Markdown2243311,093
TypeScript4123123410
Blade19082
reStructuredText1747874
DOS Batch1004
YAML1002

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.79
▷ Minimum class complexity1.00
▷ Maximum class complexity323.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces116
Interfaces153
Traits62
Classes469
▷ Abstract classes357.46%
▷ Concrete classes43492.54%
▷ Final classes419.45%
Methods5,092
▷ Static methods76915.10%
▷ Public methods4,24083.27%
▷ Protected methods70413.83%
▷ Private methods1482.91%
Functions765
▷ Named functions16421.44%
▷ Anonymous functions60178.56%
Constants238
▷ Global constants177.14%
▷ Class constants22192.86%
▷ Public constants21697.74%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected