74% max-music

Code Review | Max Music

WordPress plugin Max Music scored74%from 54 tests.

About plugin

  • Plugin page: max-music
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-3.4
  • WordPress version: 6.3.1
  • First release: Sep 20, 2015
  • Latest release: Oct 1, 2015
  • Number of updates: 23
  • Update frequency: every 1.1 days
  • Top authors: orcuntuna (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /6,866 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.71MB] [CPU: ▼50.10ms] Passed 4 tests

This is a short check of server-side resources used by Max Music
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.188.85 ▼29.04
Dashboard /wp-admin2.31 ▼1.0410.64 ▼51.41
Posts /wp-admin/edit.php2.31 ▼1.0510.16 ▼37.29
Add New Post /wp-admin/post-new.php2.31 ▼3.5910.60 ▼82.67
Media Library /wp-admin/upload.php2.31 ▼0.939.42 ▼24.91

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

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

Browser metrics Passed 4 tests

Max Music: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.27 ▼0.101.68 ▲0.1140.36 ▲0.82
Dashboard /wp-admin2,192 ▲115.51 ▼0.1488.83 ▼19.6338.53 ▼1.68
Posts /wp-admin/edit.php2,097 ▼32.03 ▼0.0038.87 ▲3.2735.36 ▲0.24
Add New Post /wp-admin/post-new.php1,526 ▼223.00 ▼0.03673.73 ▲74.0656.90 ▲5.06
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0395.09 ▼11.9440.85 ▼3.76

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
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/max-music/music.php+18
    Undefined variable: _widget_options
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_maxmusic
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/max-music/music.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === max-music === )
The official readme.txt is a good inspiration

max-music/music.php 92% from 13 tests

The entry point to "Max Music" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("max-music.php" instead of "music.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP118935

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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