68% master-slider

Code Review | Master Slider - Responsive Touch Slider

WordPress plugin Master Slider - Responsive Touch Slider scored68%from 54 tests.

About plugin

  • Plugin page: master-slider
  • Plugin version: 3.9.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 12, 2014
  • Latest release: Nov 25, 2023
  • Number of updates: 226
  • Update frequency: every 15.2 days
  • Top authors: averta (100%)

Code review

54 tests

User reviews

469 reviews

Install metrics

90,000+ active /2,655,084 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
This plugin's installer ran successfully

Server metrics [RAM: ▲1.03MB] [CPU: ▲5.00ms] 75% from 4 tests

Server-side resources used by Master Slider - Responsive Touch Slider
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 3,423.93ms on /wp-admin/admin.php?page=master-slider)
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5745.34 ▲4.41
Dashboard /wp-admin4.54 ▲1.2062.73 ▼3.52
Posts /wp-admin/edit.php4.60 ▲1.2454.39 ▲9.80
Add New Post /wp-admin/post-new.php7.08 ▲1.19102.31 ▲20.42
Media Library /wp-admin/upload.php4.40 ▲1.1743.84 ▲9.30
Settings /wp-admin/admin.php?page=master-slider-setting4.3840.89
Master Slider /wp-admin/admin.php?page=master-slider5.733,423.93

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 273 new files
Database: 2 new tables, 15 new options
New tables
wp_masterslider_sliders
wp_masterslider_options
New WordPress options
upgrade_to_pro
msp_advanced
can_compress_scripts
widget_recent-comments
db_upgraded
master-slider_ab_pro_feature_panel_content_type
widget_recent-posts
widget_master-slider-main-widget
master-slider_ab_pro_feature_setting_content_type
msp_general_setting
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Master Slider - Responsive Touch Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,109 ▲36213.21 ▼1.504.38 ▲2.7447.83 ▲3.63
Dashboard /wp-admin2,505 ▲3285.79 ▲0.22112.96 ▲13.6896.82 ▲52.35
Posts /wp-admin/edit.php2,405 ▲3052.49 ▲0.3539.25 ▲3.5243.65 ▲10.49
Add New Post /wp-admin/post-new.php1,799 ▲27325.17 ▲2.02721.60 ▲64.2936.04 ▼13.57
Media Library /wp-admin/upload.php1,708 ▲3084.46 ▲0.26100.06 ▲3.2291.99 ▲52.09
Settings /wp-admin/admin.php?page=master-slider-setting1,5022.3342.23103.80
Master Slider /wp-admin/admin.php?page=master-slider3,8332.4057.74196.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_masterslider_sliders
    • wp_masterslider_options
  • This plugin does not fully uninstall, leaving 15 options in the database
    • upgrade_to_pro
    • msp_general_setting
    • can_compress_scripts
    • widget_recent-posts
    • master-slider_ab_pro_feature_panel_content_type
    • widget_recent-comments
    • master-slider_ab_pro_feature_setting_content_type
    • widget_theysaidso_widget
    • masterslider_lite_plugin_version
    • masterslider_db_version
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/master-slider/public/views/public.php
    • > /wp-content/plugins/master-slider/uninstall.php
    • > /wp-content/plugins/master-slider/master-slider.php
  • 24× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant MSWP_AVERTA_PUB_URL - assumed 'MSWP_AVERTA_PUB_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/master-slider/public/includes/class-msp-frontend-assets.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/master-slider/admin/includes/msp-admin-functions.php:142
    • > PHP Warning
      include_once(): Failed opening 'MSWP_AVERTA_INC_DIR/index.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/master-slider/public/class-master-slider.php on line 67
    • > PHP Fatal error
      Uncaught Error: Class 'Axiom_Screen_Help' not found in wp-content/plugins/master-slider/admin/includes/classes/class-msp-screen-help.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/master-slider/admin/includes/classes/class-msp-admin-ajax.php:13
    • > PHP Warning
      include_once(MSWP_AVERTA_INC_DIR/index.php): failed to open stream: No such file or directory in wp-content/plugins/master-slider/public/class-master-slider.php on line 67
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/master-slider/includes/msp-shortcodes.php:7
    • > PHP Warning
      Use of undefined constant MSWP_AVERTA_ADMIN_URL - assumed 'MSWP_AVERTA_ADMIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/master-slider/admin/views/slider-panel/index.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function msp_get_panel_header() in wp-content/plugins/master-slider/admin/views/slider-dashboard/list-sliders.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/master-slider/admin/includes/msp-compatibility.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (33 tag instead of maximum 10)
You can take inspiration from this readme.txt

master-slider/master-slider.php Passed 13 tests

The principal PHP file in "Master Slider - Responsive Touch Slider" v. 3.9.5 is loaded by WordPress automatically on each request
139 characters long description:
Master Slider is the most advanced responsive HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on devices too.

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
Everything looks great! No dangerous files found in this plugin34,868 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
PO File64,14914,6178,449
PHP432,6812,3827,270
JSON1007,104
CSS121,0832746,255
JavaScript151,7297005,610
SVG442151
HTML15029

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity32.04
▷ Minimum class complexity1.00
▷ Maximum class complexity211.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods278
▷ Static methods113.96%
▷ Public methods25290.65%
▷ Protected methods31.08%
▷ Private methods238.27%
Functions106
▷ Named functions10599.06%
▷ Anonymous functions10.94%
Constants15
▷ Global constants1493.33%
▷ Class constants16.67%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
115 PNG files occupy 1.13MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/views/slider-panel/images/layertypes/text.png0.31KB0.31KB0.00%
admin/views/slider-panel/images/templates/flat-tablet-land.png3.22KB1.51KB▼ 53.07%
public/assets/css/templates/staff-arrows.png0.67KB0.59KB▼ 11.66%
public/assets/css/templates/flat-phone.png8.81KB4.22KB▼ 52.08%
admin/assets/images/misc/where-is-ms-shortcode.png8.97KB2.98KB▼ 66.79%