10% wayne-audio-player

Code Review | Wayne Audio Player

WordPress plugin Wayne Audio Player scored10%from 54 tests.

About plugin

  • Plugin page: wayne-audio-player
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.6
  • WordPress version: 6.3.1
  • First release: Sep 23, 2013
  • Latest release: Oct 1, 2013
  • Number of updates: 4
  • Update frequency: every 3.5 days
  • Top authors: gholme4 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /6,784 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Parse error in wp-content/plugins/wayne-audio-player/wayne-song-post-type.php+277
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.11ms] Passed 4 tests

A check of server-side resources used by Wayne Audio Player
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.69 ▼4.61
Dashboard /wp-admin3.31 ▲0.0144.09 ▼10.37
Posts /wp-admin/edit.php3.36 ▲0.0048.89 ▲2.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.36 ▼2.48
Media Library /wp-admin/upload.php3.23 ▲0.0034.21 ▼2.99

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wayne Audio Player
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.64 ▼0.733.94 ▲2.3744.20 ▲4.17
Dashboard /wp-admin2,200 ▲235.80 ▲0.92101.51 ▼7.3638.72 ▼0.33
Posts /wp-admin/edit.php2,086 ▼32.06 ▲0.0932.58 ▼4.7636.09 ▲3.04
Add New Post /wp-admin/post-new.php1,514 ▼1917.64 ▼5.58613.11 ▼67.4257.16 ▲0.64
Media Library /wp-admin/upload.php1,391 ▲34.39 ▲0.1898.10 ▼1.4342.96 ▼2.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wayne-audio-player/mobile-detect/demo.php
    • > /wp-content/plugins/wayne-audio-player/mobile-detect/manual_tests/test.php
  • 22× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wayne-audio-player/mobile-detect/manual_tests/mobile_useragents_vendorTest.inc.php on line 17
    • > PHP Notice
      Undefined variable: nonmobile_userAgents in wp-content/plugins/wayne-audio-player/mobile-detect/manual_tests/nonmobile_useragents_nonmobileTest.inc.php on line 18
    • > PHP Notice
      Undefined variable: mobilePerVendor_userAgents in wp-content/plugins/wayne-audio-player/mobile-detect/manual_tests/mobile_useragents_vendorTest.inc.php on line 17
    • > PHP Notice
      Undefined variable: html in wp-content/plugins/wayne-audio-player/mobile-detect/manual_tests/mobile_useragents_Nexus.inc.php on line 16
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/wayne-audio-player/wayne-song-post-type.php on line 277
    • > PHP Notice
      Undefined variable: detect in wp-content/plugins/wayne-audio-player/mobile-detect/manual_tests/mobile_useragents_osVersionTest.inc.php on line 13
    • > PHP Notice
      Undefined variable: detect in wp-content/plugins/wayne-audio-player/mobile-detect/manual_tests/mobile_useragents_Nexus.inc.php on line 32
    • > PHP Notice
      Undefined variable: html in wp-content/plugins/wayne-audio-player/mobile-detect/manual_tests/mobile_useragents_gradeTest.inc.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wayne-audio-player/mobile-detect/tests/VendorsTest.php:30
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wayne-audio-player/mobile-detect/manual_tests/nonmobile_useragents_nonmobileTest.inc.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add images for these screenshots: #1 (Options), #2 (Songs), #3 (Player), #4 (Edit Song)
The official readme.txt might help

wayne-audio-player/wayne-audio-player-plugin.php 92% from 13 tests

Analyzing the main PHP file in "Wayne Audio Player" version 1.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wayne-audio-player.php" instead of "wayne-audio-player-plugin.php")

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
Success! There were no dangerous files found in this plugin10,123 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,3989155,382
PHP185435563,114
CSS3102501,444
Markdown1300143
JSON10022
XML72018

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity36.67
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2686.67%
▷ Protected methods26.67%
▷ Private methods26.67%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 0.38MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/down-music-arrow.png6.65KB2.17KB▼ 67.28%
screenshot-2.png81.26KB24.79KB▼ 69.50%
screenshot-1.png43.08KB11.69KB▼ 72.87%
screenshot-3.png27.21KB8.14KB▼ 70.09%
images/wayne-icon.png3.14KB0.48KB▼ 84.72%