83% compact-wp-audio-player

Code Review | Compact WP Audio Player

WordPress plugin Compact WP Audio Player scored83%from 54 tests.

About plugin

  • Plugin page: compact-wp-audio-...
  • Plugin version: 1.9.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 4, 2013
  • Latest release: Jul 25, 2023
  • Number of updates: 50
  • Update frequency: every 76.2 days
  • Top authors: mra13 (100%)

Code review

54 tests

User reviews

67 reviews

Install metrics

30,000+ active /509,939 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Compact WP Audio Player
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0335.34 ▼4.48
Dashboard /wp-admin3.34 ▼0.0143.51 ▼15.73
Posts /wp-admin/edit.php3.39 ▲0.0345.61 ▲1.50
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.25 ▼2.97
Media Library /wp-admin/upload.php3.26 ▲0.0334.39 ▲0.38
SC Audio Player /wp-admin/options-general.php?page=compact-wp-audio-player/sc_audio_player.php3.2331.10

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Compact WP Audio Player
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10813.32 ▼1.363.25 ▲1.6241.55 ▲1.16
Dashboard /wp-admin2,210 ▲245.85 ▲0.92107.76 ▼5.3841.04 ▼1.82
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0240.26 ▲4.9537.08 ▼1.11
Add New Post /wp-admin/post-new.php1,545 ▲3118.34 ▲0.80615.04 ▼60.1951.26 ▼11.22
Media Library /wp-admin/upload.php1,395 ▲74.17 ▼0.1796.29 ▼9.0642.07 ▼1.25
SC Audio Player /wp-admin/options-general.php?page=compact-wp-audio-player/sc_audio_player.php8372.0221.5727.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/compact-wp-audio-player/sc_audio_player.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/compact-wp-audio-player/shortcodes-functions.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can look at the official readme.txt

compact-wp-audio-player/sc_audio_player.php 85% from 13 tests

This is the main PHP file of "Compact WP Audio Player" version 1.9.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("compact-wp-audio-player.php" instead of "sc_audio_player.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 170 characters long)

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
Good job! No executable or dangerous file extensions detected448 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP23717254
CSS21538122
JavaScript202772

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/round-play-button-black.png2.10KB0.92KB▼ 56.06%
image/arrow-right-black.png0.14KB0.25KB0.00%
image/arrow-right-white.png0.14KB0.25KB0.00%
image/round-pause-button-black.png2.08KB0.89KB▼ 57.10%
image/round-play-putton-black.png2.10KB0.92KB▼ 56.06%