62% mg-parallax-slider

Code Review | MG Parallax Slider

WordPress plugin MG Parallax Slider scored62%from 54 tests.

About plugin

  • Plugin page: mg-parallax-slider
  • Plugin version: 1.0....
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jun 30, 2014
  • Latest release: Dec 17, 2014
  • Number of updates: 55
  • Update frequency: every 3.1 days
  • Top authors: Mahesh901122 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /6,713 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.71MB] [CPU: ▼44.41ms] Passed 4 tests

Server-side resources used by MG Parallax Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.27 ▼0.1910.55 ▼26.28
Dashboard /wp-admin3.29 ▼0.0114.02 ▼35.32
Posts /wp-admin/edit.php3.30 ▼0.0612.59 ▼32.28
Add New Post /wp-admin/post-new.php3.29 ▼2.5913.42 ▼83.75
Media Library /wp-admin/upload.php3.29 ▲0.0614.30 ▼20.31
Add New /wp-admin/post-new.php?post_type=mgps_ps3.3013.07
Background /wp-admin/admin.php?page=mgps_options&tab=03.3015.00
Title /wp-admin/admin.php?page=mgps_options&tab=23.3015.40
All Items /wp-admin/edit.php?post_type=mgps_ps3.3015.10
Import / Export /wp-admin/admin.php?page=mgps_options&tab=53.3015.64
Navigation Arrows /wp-admin/admin.php?page=mgps_options&tab=43.3017.65
Slides /wp-admin/admin.php?page=mgps_options&tab=13.3014.75
Contents /wp-admin/admin.php?page=mgps_options&tab=33.3017.44

Server storage [IO: ▲6.09MB] [DB: ▲0.07MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (145.03KB) outside of "wp-content/plugins/mg-parallax-slider/" and "wp-content/uploads/"
    • (new file) wp-content/redux/google-fonts/googlefonts.json
Filesystem: 406 new files
Database: no new tables, 9 new options
New WordPress options
mgps
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
redux-framework-tracking
mgps-transients
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by MG Parallax Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,029 ▲26813.50 ▼0.689.98 ▲8.4037.30 ▼2.56
Dashboard /wp-admin2,296 ▲1225.64 ▲0.0383.39 ▼5.4538.09 ▼4.65
Posts /wp-admin/edit.php2,204 ▲1041.99 ▼0.0035.44 ▼1.4935.19 ▲0.02
Add New Post /wp-admin/post-new.php1,607 ▲7923.35 ▲0.26619.45 ▼42.1155.52 ▲1.60
Media Library /wp-admin/upload.php1,504 ▲1044.18 ▼0.0593.93 ▼1.9340.54 ▼0.84
Add New /wp-admin/post-new.php?post_type=mgps_ps2,4257.62199.9067.30
Background /wp-admin/admin.php?page=mgps_options&tab=02,3935.25110.31136.50
Title /wp-admin/admin.php?page=mgps_options&tab=22,7424.99121.51116.39
All Items /wp-admin/edit.php?post_type=mgps_ps1,1821.9629.5429.51
Import / Export /wp-admin/admin.php?page=mgps_options&tab=52,2154.6770.91126.87
Navigation Arrows /wp-admin/admin.php?page=mgps_options&tab=42,3475.0286.57118.03
Slides /wp-admin/admin.php?page=mgps_options&tab=12,2434.7073.99110.23
Contents /wp-admin/admin.php?page=mgps_options&tab=32,7424.92119.38141.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/mg-parallax-slider/framework/core/extensions/customizer/extension_customizer.php+312
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • Zombie WordPress options detected upon uninstall: 9 options
    • mgps
    • redux-framework-tracking
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • mgps-transients
    • widget_theysaidso_widget

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
Smoke test failed, please fix the following
  • 40 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Warning in wp-content/plugins/mg-parallax-slider/framework/core/extensions/customizer/extension_customizer.php+382
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/mg-parallax-slider/framework/core/extensions/customizer/extension_customizer.php on line 312
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mg-parallax-slider/framework/core/inc/fields/select/elusive-icons.php:312
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/mg-parallax-slider/framework/core/extensions/customizer/extension_customizer.php on line 382
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/mg-parallax-slider/framework/core/extensions/customizer/extension_customizer.php on line 325
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/mg-parallax-slider/framework/core/extensions/customizer/extension_customizer.php on line 351
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/mg-parallax-slider/framework/core/extensions/customizer/extension_customizer.php on line 363
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mg-parallax-slider/mg-parallax-slider.php:67

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/037-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/036-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/033-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/default-bg-1.gif - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/034-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/026-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/029-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/031-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/022-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/023-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/024-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/009-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/001-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/014-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/015-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/bgr1-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/032-1.jpg - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/arrows.png - Failed to load resource: the server responded with a status of 404 ()
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=3
    • > Network (severe)
    https://3b073ac2c18e8837dfd43e1fefb99744f0b466e0.googledrive.com/host/0B_asRBcBoGviZXB2LVB6cDBNbHM/images/bgr2-1.jpg - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=mgps_options&tab=1
    • > Javascript (severe) in unknown
    /wp-content/plugins/mg-parallax-slider/framework/core/inc/fields/slides/field_slides.min.js?ver=1697795586 0:582 Uncaught TypeError: b.find(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt might help

mg-parallax-slider/mg-parallax-slider.php 85% from 13 tests

"MG Parallax Slider" version 1.0....'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:
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "1.0....")
  • Description: Keep the plugin description shorter than 140 characters (currently 419 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin37,161 lines of code in 325 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1532,7712,14812,052
PHP692,8174,17910,129
JSON2004,963
CSS423141484,502
LESS313881964,011
Sass24301,070
SVG100309
Markdown229070
Bourne Shell124055

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity35.12
▷ Minimum class complexity1.00
▷ Maximum class complexity764.00
Average method complexity7.45
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes66
▷ Abstract classes00.00%
▷ Concrete classes66100.00%
▷ Final classes00.00%
Methods349
▷ Static methods277.74%
▷ Public methods33395.42%
▷ Protected methods00.00%
▷ Private methods164.58%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
35 PNG files occupy 0.43MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
framework/core/inc/fields/spinner/arrow_left.png0.15KB0.12KB▼ 16.67%
framework/core/inc/fields/color_rgba/vendor/minicolors/jquery.minicolors.png75.64KB34.31KB▼ 54.64%
framework/core/assets/img/menu_icon.png1.41KB0.50KB▼ 64.62%
framework/core/assets/js/vendor/select2/select2.png0.60KB0.99KB0.00%
screenshot.png306.16KB152.00KB▼ 50.35%