73% music-management-pro

Code Review | Music Management Pro

WordPress plugin Music Management Pro scored73%from 54 tests.

About plugin

  • Plugin page: music-management-pro
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.3.12+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Sep 15, 2020
  • Latest release: Nov 24, 2020
  • Number of updates: 8
  • Update frequency: every 8.8 days
  • Top authors: idealand (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,791 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.43MB] [CPU: ▼1.66ms] Passed 4 tests

This is a short check of server-side resources used by Music Management Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2342.43 ▲2.77
Dashboard /wp-admin3.84 ▲0.5344.97 ▼1.98
Posts /wp-admin/edit.php3.89 ▲0.5447.48 ▼1.45
Add New Post /wp-admin/post-new.php6.35 ▲0.4788.06 ▼5.97
Media Library /wp-admin/upload.php3.70 ▲0.4840.64 ▲4.34
Music Management Pro /wp-admin/admin.php?page=mmp3.6840.16
Artists /wp-admin/admin.php?page=mmp_artists3.6945.79
Music /wp-admin/admin.php?page=mmp_music3.6936.04
Genres /wp-admin/admin.php?page=mmp_genres3.6938.26

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 62 new files
Database: 5 new tables, 6 new options
New tables
wp_mmp_music
wp_mmp_genres_relation
wp_mmp_artist
wp_mmp_genres
wp_mmp_genres_music_relation
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Music Management Pro
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲12114.47 ▲0.201.80 ▼0.0341.44 ▼10.97
Dashboard /wp-admin2,265 ▲744.87 ▼1.0399.81 ▼2.5239.18 ▼6.43
Posts /wp-admin/edit.php2,124 ▲352.06 ▲0.0734.92 ▼6.7435.39 ▼2.21
Add New Post /wp-admin/post-new.php1,542 ▼217.64 ▼0.62690.70 ▲76.5544.60 ▼10.59
Media Library /wp-admin/upload.php1,447 ▲564.26 ▲0.13112.82 ▲15.9346.98 ▲1.33
Music Management Pro /wp-admin/admin.php?page=mmp1,0913.1350.08122.32
Artists /wp-admin/admin.php?page=mmp_artists1,1163.1445.5187.82
Music /wp-admin/admin.php?page=mmp_music1,1223.1740.2494.46
Genres /wp-admin/admin.php?page=mmp_genres1,1103.2442.2996.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables detected upon uninstall: 5 tables
    • wp_mmp_artist
    • wp_mmp_genres_relation
    • wp_mmp_genres
    • wp_mmp_genres_music_relation
    • wp_mmp_music
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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 | 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
  • 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-management-pro/include/admin/ajax/MMP_Ajax_Delete.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-management-pro/include/admin/ajax/MMP_Ajax_Play.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-management-pro/include/admin/ajax/MMP_Ajax_See_Follower.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-management-pro/include/admin/ajax/MMP_Ajax_Multi_Select_Artists.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-management-pro/include/admin/page/MMP_Artist.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-management-pro/include/admin/ajax/MMP_Ajax_See_Like.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-management-pro/include/admin/ajax/MMP_Ajax_Like.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-management-pro/include/admin/ajax/MMP_Ajax_Form_Load.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-management-pro/include/MMP_Register_Plugin.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-management-pro/include/admin/page/MMP_Music.php:14

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
4 plugin tags: music management pro, music, mmp, audio

music-management-pro/main.php 85% from 13 tests

The primary PHP file in "Music Management Pro" version 1.0.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("music-management-pro.php" instead of "main.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
There were no executable files found in this plugin7,658 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP308694622,695
CSS6311641,894
JavaScript67765091,743
SVG3011,326

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.30
Average class complexity8.97
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes13.45%
Methods126
▷ Static methods5039.68%
▷ Public methods10986.51%
▷ Protected methods21.59%
▷ Private methods1511.90%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants1090.91%
▷ Class constants19.09%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 1.41MB with 0.79MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/license-background.png36.16KB19.70KB▼ 45.53%
assets/img/Go To Pro.png1,022.88KB356.88KB▼ 65.11%
assets/img/background-alert.png41.51KB20.78KB▼ 49.94%
assets/img/Go To Pro - Mini.png325.87KB109.62KB▼ 66.36%
assets/img/background-art-logo.png20.65KB9.52KB▼ 53.88%