68% music-store

Code Review | Music Store - WordPress eCommerce

WordPress plugin Music Store - WordPress eCommerce scored68%from 54 tests.

About plugin

  • Plugin page: music-store
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 26, 2013
  • Latest release: Nov 30, 2023
  • Number of updates: 505
  • Update frequency: every 7.8 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

47 reviews

Install metrics

400+ active /182,371 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.71MB] [CPU: ▲12.24ms] Passed 4 tests

An overview of server-side resources used by Music Store - WordPress eCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.19 ▲1.7354.23 ▲9.37
Dashboard /wp-admin5.02 ▲1.6865.82 ▲5.18
Posts /wp-admin/edit.php5.07 ▲1.7169.73 ▲22.34
Add New Post /wp-admin/post-new.php7.63 ▲1.74107.10 ▲12.07
Media Library /wp-admin/upload.php4.96 ▲1.7359.73 ▲25.30
Online Help /wp-admin/admin.php?page=music-store-menu-help4.9354.80
Store Settings /wp-admin/admin.php?page=music-store-menu-settings5.0066.41
Sales Report /wp-admin/admin.php?page=music-store-menu-reports5.0056.03
Set Artists /wp-admin/edit-tags.php?taxonomy=ms_artist4.9552.51
Songs for Sale /wp-admin/edit.php?post_type=ms_song5.0055.16
Set Genres /wp-admin/edit-tags.php?taxonomy=ms_genre4.9553.67
Set Albums /wp-admin/edit-tags.php?taxonomy=ms_album4.9549.33
Music Store /wp-admin/options-general.php?page=music-store-menu-settings15.00380.54
Songs Importer /wp-admin/admin.php?page=music-store-menu-importer5.0055.39
Products Templates /wp-admin/admin.php?page=music-store-menu-templates4.9859.58

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 1,245 new files
Database: 3 new tables, 14 new options
New tables
wp_msdb_post_data
wp_msdb_reviews
wp_msdb_purchase
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_msloginformwidget
widget_theysaidso_widget
db_upgraded
ms_has_been_configured
music_store_version_number
installed_music-store
widget_msproductlistwidget
ms_social_buttons
...

Browser metrics Passed 4 tests

An overview of browser requirements for Music Store - WordPress eCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,010 ▲23814.13 ▼0.2215.87 ▲13.9535.52 ▼8.73
Dashboard /wp-admin2,275 ▲985.83 ▲0.2598.05 ▼3.5089.11 ▲46.64
Posts /wp-admin/edit.php2,161 ▲611.97 ▼0.0539.48 ▲2.0333.96 ▲1.31
Add New Post /wp-admin/post-new.php6,261 ▲4,73518.91 ▼4.00965.66 ▲290.9939.09 ▼15.34
Media Library /wp-admin/upload.php1,452 ▲494.20 ▲0.0692.90 ▼7.5878.90 ▲36.95
Online Help /wp-admin/admin.php?page=music-store-menu-help3,5885.36110.46143.18
Store Settings /wp-admin/admin.php?page=music-store-menu-settings1,1383.0042.2668.33
Sales Report /wp-admin/admin.php?page=music-store-menu-reports1,9323.0443.1760.12
Set Artists /wp-admin/edit-tags.php?taxonomy=ms_artist1,3042.1227.8932.17
Songs for Sale /wp-admin/edit.php?post_type=ms_song1,1871.9335.6429.86
Set Genres /wp-admin/edit-tags.php?taxonomy=ms_genre1,3322.1226.6131.70
Set Albums /wp-admin/edit-tags.php?taxonomy=ms_album1,3072.1230.0427.55
Music Store /wp-admin/options-general.php?page=music-store-menu-settings12,9223.0143.5797.08
Songs Importer /wp-admin/admin.php?page=music-store-menu-importer1,0512.9838.4354.81
Products Templates /wp-admin/admin.php?page=music-store-menu-templates4,0446.82132.9689.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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
  • Zombie tables detected upon uninstall: 3 tables
    • wp_msdb_reviews
    • wp_msdb_purchase
    • wp_msdb_post_data
  • The uninstall procedure has failed, leaving 14 options in the database
    • ms_has_been_configured
    • widget_recent-comments
    • can_compress_scripts
    • widget_msproductwidget
    • widget_msproductlistwidget
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • installed_music-store
    • widget_msloginformwidget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 34× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/music-store/ms-addons/mollie-addon/vendor/mollie/mollie-api-php/examples/01-new-payment.php
    • > /wp-content/plugins/music-store/ms-core/ms-download.php
    • > /wp-content/plugins/music-store/ms-core/ms-widgets.php
    • > /wp-content/plugins/music-store/ms-addons/mollie-addon/vendor/mollie/mollie-api-php/examples/11-new-customer.php
    • > /wp-content/plugins/music-store/ms-addons/mollie-addon/vendor/mollie/mollie-api-php/examples/12-new-customer-payment.php
    • > /wp-content/plugins/music-store/ms-addons/mollie-addon/vendor/mollie/mollie-api-php/examples/16-recurring-subscription.php
    • > /wp-content/plugins/music-store/ms-page-builder/beaverbuilder/ms/includes/frontend.php
    • > /wp-content/plugins/music-store/ms-core/ms-song.php
    • > /wp-content/plugins/music-store/ms-addons/mollie-addon/vendor/mollie/mollie-api-php/examples/13-customer-payments-history.php
    • > /wp-content/plugins/music-store/ms-addons/mollie-addon/vendor/mollie/mollie-api-php/examples/09-oauth-list-settlements.php
  • 165× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\BaseResource' not found in wp-content/plugins/music-store/ms-addons/mollie-addon/vendor/mollie/mollie-api-php/src/Resources/Refund.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/music-store/ms-addons/mollie-addon/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Square\\Apis\\BaseApi' not found in wp-content/plugins/music-store/ms-addons/square-addon/vendor/square/square/src/Apis/LocationsApi.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\CursorCollection' not found in wp-content/plugins/music-store/ms-addons/mollie-addon/vendor/mollie/mollie-api-php/src/Resources/MandateCollection.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/music-store/ms-page-builder/siteorigin/siteorigin-ms-product/siteorigin-ms-product.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/music-store/ms-page-builder/siteorigin/siteorigin-ms-product-list/tpl/siteorigin-ms-products-list-shortcode.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/music-store/ms-addons/mollie.addon.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/music-store/ms-addons/mollie-addon/vendor/guzzlehttp/psr7/src/DroppingStream.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\CursorCollection' not found in wp-content/plugins/music-store/ms-addons/mollie-addon/vendor/mollie/mollie-api-php/src/Resources/SettlementCollection.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Square\\Apis\\BaseApi' not found in wp-content/plugins/music-store/ms-addons/square-addon/vendor/square/square/src/Apis/OrdersApi.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can look at the official readme.txt

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

The primary PHP file in "Music Store - WordPress eCommerce" version 1.1.6 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 191 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected108,938 lines of code in 1,159 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,07920,18475,52692,541
PO File63,0474,4677,235
Markdown141,14203,513
JavaScript8165811,762
JSON15001,367
CSS11170401,243
XML5340453
HTML7130412
reStructuredText1158139218
YAML4171153
INI30018
Dockerfile18010
make1409
SVG4004

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity13.39
▷ Minimum class complexity1.00
▷ Maximum class complexity629.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces28
Interfaces21
Traits2
Classes990
▷ Abstract classes40.40%
▷ Concrete classes98699.60%
▷ Final classes232.33%
Methods7,544
▷ Static methods2743.63%
▷ Public methods7,29496.69%
▷ Protected methods640.85%
▷ Private methods1862.47%
Functions851
▷ Named functions12314.45%
▷ Anonymous functions72885.55%
Constants1,522
▷ Global constants805.26%
▷ Class constants1,44294.74%
▷ Public constants1,44199.93%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
21 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ms-core/images/music-store-menu-icon.png0.21KB0.10KB▼ 53.92%
ms-layouts/02/star_off.png0.46KB0.33KB▼ 28.21%
ms-layouts/03/star_on.png0.42KB0.29KB▼ 28.94%
ms-layouts/02/star_on.png0.42KB0.29KB▼ 28.94%
paypal_buttons/shopping_cart/button_g.png0.48KB0.36KB▼ 25.96%