72% music-press-pro

Code Review | Music Press Pro

WordPress plugin Music Press Pro scored72%from 54 tests.

About plugin

  • Plugin page: music-press-pro
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.4
  • WordPress version: 6.3.1
  • First release: Feb 22, 2018
  • Latest release: May 7, 2020
  • Number of updates: 29
  • Update frequency: every 27.8 days
  • Top authors: tuyennv (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

200+ active /15,230 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲2.66MB] [CPU: ▲21.58ms] Passed 4 tests

A check of server-side resources used by Music Press Pro
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.05 ▲2.5966.12 ▲27.66
Dashboard /wp-admin6.18 ▲2.8878.37 ▲32.76
Posts /wp-admin/edit.php6.23 ▲2.8879.84 ▲33.71
Add New Post /wp-admin/post-new.php8.25 ▲2.3690.22 ▼6.50
Media Library /wp-admin/upload.php6.04 ▲2.8170.29 ▲32.38
Music Press Pro /wp-admin/admin.php?page=music_press5.8953.94
Free Add-ons /wp-admin/admin.php?page=music-add-ons5.9853.94
ACL /wp-admin/admin.php?page=mp_roles6.1258.62
Settings /wp-admin/admin.php?page=acf-options-settings6.0356.81

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 212 new files
Database: no new tables, 16 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
mp_role_subscriber_meta
mp_role_author_meta
db_upgraded
mp_role_editor_meta
widget_widget_albums
music_press_installed_terms
mp_role_administrator_meta
mp_role_contributor_meta
...

Browser metrics Passed 4 tests

Checking browser requirements for Music Press Pro
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲15413.77 ▼0.841.59 ▼0.0842.47 ▲2.13
Dashboard /wp-admin2,272 ▲1175.11 ▼0.54114.08 ▲2.9782.69 ▲39.88
Posts /wp-admin/edit.php2,173 ▲812.23 ▲0.1934.98 ▼5.5136.10 ▲0.30
Add New Post /wp-admin/post-new.php8,016 ▲6,50224.50 ▲7.051,052.43 ▲362.4740.93 ▼15.93
Media Library /wp-admin/upload.php1,466 ▲784.40 ▲0.20111.87 ▼1.8572.52 ▲24.44
Music Press Pro /wp-admin/admin.php?page=music_press280.440.074.69
Free Add-ons /wp-admin/admin.php?page=music-add-ons8741.8426.3330.00
ACL /wp-admin/admin.php?page=mp_roles8431.8324.6923.09
Settings /wp-admin/admin.php?page=acf-options-settings2,6697.57144.6693.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 16 options
    • widget_theysaidso_widget
    • mp_role_author_meta
    • db_upgraded
    • widget_widget_recent_songs
    • mp_role_administrator_meta
    • widget_widget_video_song
    • can_compress_scripts
    • mp_role_subscriber_meta
    • widget_recent-posts
    • mp_role_editor_meta
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=acf-options-settings
    • > Notice in wp-content/plugins/music-press-pro/includes/library/acf-options-page/acf-options-page.php+490
    Undefined index: HTTP_REFERER

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 fix the following
  • 59× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-press-pro/includes/library/acf/core/controllers/post.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-press-pro/includes/library/acf/core/controllers/input.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/music-press-pro/includes/library/acf/core/fields/image.php:3
    • > PHP Notice
      Undefined variable: object in wp-content/plugins/music-press-pro/includes/admin/templates/acl/delete.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/music-press-pro/includes/library/acf-options-page/acf-options-page.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/music-press-pro/includes/library/acf/core/fields/password.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/music-press-pro/includes/admin/templates/acl/edit.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/music-press-pro/includes/library/acf/core/fields/message.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/music-press-pro/includes/library/acf/core/controllers/field_group.php:28
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/music-press-pro/includes/admin/templates/acl/edit.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=music_press
    • > Network (severe)
    wp-admin/admin.php?page=music_press - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=acf-options-settings
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=acf-options-settings 246:28 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: audio playlist, music manager, audio store, video playlist, music store...

music-press-pro/music-press-pro.php 92% from 13 tests

The entry point to "Music Press Pro" version 1.4.6 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 161 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected44,324 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP1255,6906,13920,295
JavaScript263,8192,7888,369
CSS178714447,914
PO File41,5721,8973,504
SVG1002,671
LESS1101,571

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity26.47
▷ Minimum class complexity1.00
▷ Maximum class complexity189.00
Average method complexity4.34
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes66
▷ Abstract classes00.00%
▷ Concrete classes66100.00%
▷ Final classes11.52%
Methods500
▷ Static methods30.60%
▷ Public methods49498.80%
▷ Protected methods51.00%
▷ Private methods10.20%
Functions146
▷ Named functions13995.21%
▷ Anonymous functions74.79%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/shortcode/icon.png1.39KB0.60KB▼ 56.65%
includes/library/acf/images/arrows.png0.24KB0.24KB0.00%
includes/library/acf/images/arrows@2x.png0.84KB0.88KB0.00%
assets/images/music_playlist.png6.59KB2.37KB▼ 64.07%
assets/css/chosen-sprite.png0.53KB0.88KB0.00%