10% music-seller

Code Review | Music Seller

WordPress plugin Music Seller scored10%from 54 tests.

About plugin

  • Plugin page: music-seller
  • Plugin version: 3.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Jul 1, 2014
  • Latest release: Feb 6, 2018
  • Number of updates: 57
  • Update frequency: every 23.2 days
  • Top authors: motov.net (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

40+ active /10,999 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/music-seller/functions.php+14
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼57.73ms] Passed 4 tests

A check of server-side resources used by Music Seller
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.72 ▼33.84
Dashboard /wp-admin2.05 ▼1.306.72 ▼66.21
Posts /wp-admin/edit.php2.05 ▼1.315.58 ▼45.23
Add New Post /wp-admin/post-new.php2.05 ▼3.846.25 ▼85.64
Media Library /wp-admin/upload.php2.05 ▼1.187.29 ▼25.37
Add New /wp-admin/post-new.php?post_type=music_seller_order2.057.60
Orders /wp-admin/edit.php?post_type=music_seller_order2.056.16

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 124 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Music Seller
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲11713.38 ▼1.031.68 ▼0.1842.22 ▼1.22
Dashboard /wp-admin2,263 ▲725.05 ▼0.84101.89 ▲1.0440.12 ▼0.16
Posts /wp-admin/edit.php2,151 ▲622.32 ▲0.3136.86 ▼2.5834.83 ▼3.10
Add New Post /wp-admin/post-new.php6,297 ▲4,77821.71 ▼1.41865.09 ▲282.8754.19 ▲3.67
Media Library /wp-admin/upload.php1,448 ▲634.44 ▲0.23111.64 ▲9.9743.39 ▼0.91
Add New /wp-admin/post-new.php?post_type=music_seller_order1,5032.8157.6532.11
Music Seller /wp-admin/music_seller_options.php260.440.0617.82
Orders /wp-admin/edit.php?post_type=music_seller_order1,1192.2534.0325.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/music-seller/functions.php+839
    Undefined index: task
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=music_seller_order
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/music-seller/functions.php+839
    Undefined index: task
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=music_seller_order
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/music-seller/functions.php+1253
    Undefined index: music_seller_download
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=music_seller_order
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/music-seller/functions.php+1288
    Undefined index: music_seller_free_download
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=music_seller_order
    • > Notice in wp-content/plugins/music-seller/functions.php+254
    Undefined index: music_seller_price
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=music_seller_order
    • > Notice in wp-content/plugins/music-seller/functions.php+256
    Undefined index: music_seller_title
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=music_seller_order
    • > Notice in wp-content/plugins/music-seller/functions.php+258
    Undefined index: music_seller_order
    • > GET request to /wp-admin/post-new.php?post_type=music_seller_order
    • > Notice in wp-content/plugins/music-seller/functions.php+261
    Undefined index: music_seller_delete

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 69× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/music-seller/includes/getid3/module.graphic.efax.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/music-seller/includes/getid3/module.audio-video.flv.php:76
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/music-seller/includes/getid3/module.misc.pdf.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/music-seller/includes/getid3/module.archive.tar.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/music-seller/includes/getid3/module.audio-video.nsv.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/music-seller/includes/getid3/module.audio.aac.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/music-seller/includes/getid3/module.audio.shorten.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/music-seller/includes/getid3/module.audio.bonk.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_lib' not found in wp-content/plugins/music-seller/includes/getid3/write.id3v2.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/music-seller/includes/getid3/module.audio.midi.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/music_seller_options.php
    • > Network (severe)
    wp-admin/music_seller_options.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Too many tags (26 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

music-seller/music_seller.php 92% from 13 tests

"Music Seller" version 3.8.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("music-seller.php" instead of "music_seller.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Almost there! Just fix the following issues
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/music-seller/payment_gateways/paypal/cert/api_cert_chain.crt
32,473 lines of code in 101 files:
LanguageFilesBlank linesComment linesLines of code
PHP795,0087,45826,150
JavaScript93884804,361
CSS73711421,630
HTML501197
Markdown1440135

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 346)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity65.37
▷ Minimum class complexity1.00
▷ Maximum class complexity588.00
Average method complexity10.24
▷ Minimum method complexity1.00
▷ Maximum method complexity346.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes83
▷ Abstract classes11.20%
▷ Concrete classes8298.80%
▷ Final classes00.00%
Methods580
▷ Static methods18632.07%
▷ Public methods54093.10%
▷ Protected methods122.07%
▷ Private methods284.83%
Functions30
▷ Named functions2996.67%
▷ Anonymous functions13.33%
Constants240
▷ Global constants21991.25%
▷ Class constants218.75%
▷ Public constants21100.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
5 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/player/skin/circle.skin/buffer.png5.26KB3.62KB▼ 31.19%
js/player/skin/pink.flag/jplayer.pink.flag.video.play.png17.28KB4.28KB▼ 75.21%
js/player/skin/blue.monday/image/jplayer.blue.monday.video.play.png17.28KB4.28KB▼ 75.21%
js/player/skin/circle.skin/progress.png7.20KB3.06KB▼ 57.49%
js/player/skin/blue.monday/jplayer.blue.monday.video.play.png17.28KB4.28KB▼ 75.21%