10% mk-slider

Code Review | MK Slider

WordPress plugin MK Slider scored10%from 54 tests.

About plugin

  • Plugin page: mk-slider
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2010
  • Latest release: Jun 16, 2015
  • Number of updates: 133
  • Update frequency: every 12.6 days
  • Top authors: manoj_rana91986 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /19,313 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/mk-slider/admin/init.php+54
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼56.44ms] Passed 4 tests

Analyzing server-side resources used by MK Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.446.09 ▼42.11
Dashboard /wp-admin2.05 ▼1.265.49 ▼47.93
Posts /wp-admin/edit.php2.05 ▼1.315.44 ▼43.59
Add New Post /wp-admin/post-new.php2.05 ▼3.845.54 ▼92.11
Media Library /wp-admin/upload.php2.05 ▼1.187.16 ▼27.72
Add New /wp-admin/post-new.php?post_type=mkslider2.056.06
All Sliders /wp-admin/edit.php?post_type=mkslider2.057.04

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for MK Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲19914.00 ▼0.3515.41 ▲13.5442.52 ▼1.88
Dashboard /wp-admin2,214 ▲375.57 ▼0.0583.15 ▼6.5966.71 ▲24.71
Posts /wp-admin/edit.php2,148 ▲482.21 ▲0.1937.59 ▲2.5936.08 ▼2.11
Add New Post /wp-admin/post-new.php1,556 ▲3023.18 ▲0.17768.64 ▲112.0151.03 ▼3.62
Media Library /wp-admin/upload.php1,438 ▲354.26 ▼0.0598.61 ▼2.2374.79 ▲26.59
Add New /wp-admin/post-new.php?post_type=mkslider1,9852.6359.0078.31
All Sliders /wp-admin/edit.php?post_type=mkslider1,1582.1832.9432.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/mk-slider/admin/init.php+54
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_mkslider_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mkslider
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/mk-slider/admin/init.php+54
    Function create_function() is deprecated
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+25
    Undefined index: mk_slides_count
  • 46 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+196
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+26
    Undefined index: mk_images
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+27
    Undefined index: mk_links
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+28
    Undefined index: mk_links_target
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+29
    Undefined index: mk_titles
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+30
    Undefined index: mk_desc
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+122
    Undefined index: mkShowLabel
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+130
    Undefined index: mkShowNav
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+138
    Undefined index: mkStopOverHover
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+144
    Undefined index: mkSliderWidth
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+149
    Undefined index: mkSliderHeight
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+154
    Undefined index: mkSliderBorderWidth
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+160
    Undefined index: mkSliderBorderColor
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+168
    Undefined index: mkSliderBorderRadius
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+180
    Undefined index: mkSliderTransition
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+188
    Undefined index: mkTransitionVelocity
    • > GET request to /wp-admin/post-new.php?post_type=mkslider
    • > Notice in wp-content/plugins/mk-slider/admin/slides-metabox.php+196
    Undefined index: mkSliderInterval

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
Almost there! Just fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mk-slider/admin/slider-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mk-slider/admin/slides-metabox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mk-slider/admin/slides-sidebar-metabox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mk-slider/admin/init.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mk-slider/admin/init.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mk-slider/admin/post-type.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: A description for screenshot #1 is required in mk-slider/assets to your readme.txt
You can take inspiration from this readme.txt

mk-slider/mk_slider.php 92% from 13 tests

The principal PHP file in "MK Slider" v. 1.3.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mk-slider.php" instead of "mk_slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin826 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP675109579
JavaScript41093176
CSS2182471

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/minus.png0.11KB0.11KB▼ 4.31%
images/play-button.png0.59KB0.44KB▼ 25.33%
images/focus-button.png0.74KB0.54KB▼ 26.13%
images/mk32.png1.52KB1.65KB0.00%
images/prev.png0.86KB0.47KB▼ 45.48%