10% whats-in-your-headphones

Code Review | What’s In Your Headphones

WordPress plugin What’s In Your Headphones scored10%from 54 tests.

About plugin

  • Plugin page: whats-in-your-hea...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Aug 28, 2014
  • Latest release: Aug 28, 2014
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: liddweaver (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /833 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/whats-in-your-headphones/whats-in-your-headphones.php+268
    Methods with the same name as their class will not be constructors in a future version of PHP; dw_in_your_headphones_widget has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼53.23ms] Passed 4 tests

An overview of server-side resources used by What’s In Your Headphones
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.10 ▼36.07
Dashboard /wp-admin2.12 ▼1.239.70 ▼47.65
Posts /wp-admin/edit.php2.12 ▼1.246.28 ▼42.41
Add New Post /wp-admin/post-new.php2.12 ▼3.775.20 ▼86.80
Media Library /wp-admin/upload.php2.12 ▼1.115.09 ▼24.63

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_dw_in_your_headphones_widget

Browser metrics Passed 4 tests

A check of browser resources used by What’s In Your Headphones
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲12213.24 ▼1.201.92 ▲0.1945.20 ▼1.04
Dashboard /wp-admin2,249 ▲644.87 ▼0.16104.56 ▼1.4338.55 ▼6.01
Posts /wp-admin/edit.php2,091 ▲22.02 ▼0.0341.25 ▲0.2333.73 ▼2.18
Add New Post /wp-admin/post-new.php1,535 ▲1623.25 ▲0.17667.43 ▲12.8261.23 ▲9.87
Media Library /wp-admin/upload.php1,384 ▼74.23 ▲0.0492.52 ▼7.6840.97 ▼2.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/whats-in-your-headphones/whats-in-your-headphones.php+268
    Methods with the same name as their class will not be constructors in a future version of PHP; dw_in_your_headphones_widget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_dw_in_your_headphones_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/whats-in-your-headphones/whats-in-your-headphones.php:99

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: widget, music, dashboard, share

whats-in-your-headphones/whats-in-your-headphones.php 92% from 13 tests

The main PHP script in "What’s In Your Headphones" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 176 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
No dangerous file extensions were detected183 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110570183

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon_headphones.png0.46KB0.36KB▼ 22.51%