74% audiocase

Code Review | audioCase

WordPress plugin audioCase scored74%from 54 tests.

About plugin

  • Plugin page: audiocase
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2022
  • Latest release: Sep 4, 2023
  • Number of updates: 27
  • Update frequency: every 9.8 days
  • Top authors: pconceptions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /598 total downloads

Benchmarks

Plugin footprint 65% 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: ▲4.65MB] [CPU: ▲35.67ms] Passed 4 tests

A check of server-side resources used by audioCase
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.69 ▲4.2272.10 ▲32.56
Dashboard /wp-admin8.08 ▲4.7889.84 ▲38.84
Posts /wp-admin/edit.php8.14 ▲4.7876.10 ▲26.68
Add New Post /wp-admin/post-new.php10.96 ▲5.07135.56 ▲45.77
Media Library /wp-admin/upload.php8.04 ▲4.8178.64 ▲44.61
Taxonomies /wp-admin/edit.php?post_type=acf-taxonomy8.0689.32
Post Types /wp-admin/edit.php?post_type=acf-post-type8.0674.26
All audioCases /wp-admin/edit.php?post_type=acase7.9962.87
Field Groups /wp-admin/edit.php?post_type=acf-field-group8.0669.66
Add New /wp-admin/post-new.php?post_type=acase8.2480.56

Server storage [IO: ▲18.88MB] [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: 494 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
acf_version
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for audioCase
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲12315.60 ▲1.2325.77 ▲23.7941.39 ▼3.97
Dashboard /wp-admin2,238 ▲474.85 ▼0.9998.72 ▼19.2038.55 ▼8.51
Posts /wp-admin/edit.php2,118 ▲292.04 ▲0.0537.94 ▼2.8431.89 ▼3.09
Add New Post /wp-admin/post-new.php6,691 ▲5,17724.64 ▲6.851,054.11 ▲325.7039.72 ▼9.12
Media Library /wp-admin/upload.php1,969 ▲5818.33 ▲4.06228.65 ▲122.6551.81 ▲11.31
Taxonomies /wp-admin/edit.php?post_type=acf-taxonomy1,7072.3336.7167.56
Post Types /wp-admin/edit.php?post_type=acf-post-type1,7092.1337.3843.12
All audioCases /wp-admin/edit.php?post_type=acase1,0932.0231.2433.17
Field Groups /wp-admin/edit.php?post_type=acf-field-group1,6732.2635.9542.73
Add New /wp-admin/post-new.php?post_type=acase2,3888.01159.9647.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • acf_version
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please fix the following items
  • 117× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/audiocase/lib/advanced-custom-fields/includes/fields/class-acf-field-tab.php:5
    • > PHP Notice
      Undefined variable: rule in wp-content/plugins/audiocase/lib/advanced-custom-fields/includes/admin/views/html-location-rule.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/audiocase/lib/advanced-custom-fields/includes/fields/class-acf-field-output.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/audiocase/lib/advanced-custom-fields/includes/admin/views/upgrade/upgrade.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_get_location_rule_types() in wp-content/plugins/audiocase/lib/advanced-custom-fields/includes/admin/views/html-location-rule.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/audiocase/lib/advanced-custom-fields/includes/fields/class-acf-field-link.php:5
    • > PHP Notice
      Undefined variable: rule in wp-content/plugins/audiocase/lib/advanced-custom-fields/includes/admin/views/acf-field-group/location-rule.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_get_combined_taxonomy_settings_tabs() in wp-content/plugins/audiocase/lib/advanced-custom-fields/includes/admin/views/acf-taxonomy/advanced-settings.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/audiocase/lib/advanced-custom-fields/includes/admin/views/acf-field-group/field.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/audiocase/lib/advanced-custom-fields/includes/acf-value-functions.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: song player, single song, music, music player, audio...

audiocase/audioCase.php 92% from 13 tests

Analyzing the main PHP file in "audioCase" version 1.2.1
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("audiocase.php" instead of "audioCase.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin209,196 lines of code in 371 files:
LanguageFilesBlank linesComment linesLines of code
PO File4646,02769,921110,462
JavaScript309,82515,38856,854
PHP17910,09322,10828,755
CSS207131,52412,820
SVG9500291
Markdown111014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.49
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes117
▷ Abstract classes32.56%
▷ Concrete classes11497.44%
▷ Final classes21.75%
Methods1,013
▷ Static methods20.20%
▷ Public methods98997.63%
▷ Protected methods00.00%
▷ Private methods242.37%
Functions571
▷ Named functions56198.25%
▷ Anonymous functions101.75%
Constants14
▷ Global constants1285.71%
▷ Class constants214.29%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
43 PNG files occupy 0.86MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/advanced-custom-fields/assets/images/field-type-previews/field-preview-taxonomy.png11.45KB6.06KB▼ 47.07%
lib/advanced-custom-fields/assets/images/field-type-previews/field-preview-accordion.png25.91KB12.25KB▼ 52.71%
lib/advanced-custom-fields/assets/images/field-type-previews/field-preview-clone.png44.19KB20.25KB▼ 54.17%
lib/advanced-custom-fields/assets/images/field-type-previews/field-preview-checkbox.png12.59KB6.28KB▼ 50.12%
lib/advanced-custom-fields/assets/images/field-type-previews/field-preview-true-false.png6.06KB3.05KB▼ 49.61%