68% mi-carousel-slider

Code Review | MI Carousel

WordPress plugin MI Carousel scored68%from 54 tests.

About plugin

  • Plugin page: mi-carousel-slider
  • Plugin version: 2.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.4-5.2.1
  • WordPress version: 6.3.1
  • First release: Nov 21, 2018
  • Latest release: Oct 31, 2019
  • Number of updates: 19
  • Update frequency: every 18.1 days
  • Top authors: midexigner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /803 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.41ms] Passed 4 tests

This is a short check of server-side resources used by MI Carousel
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1442.87 ▲0.16
Dashboard /wp-admin3.44 ▲0.1450.99 ▲0.17
Posts /wp-admin/edit.php3.56 ▲0.2055.01 ▲4.78
Add New Post /wp-admin/post-new.php6.05 ▲0.1786.01 ▼12.28
Media Library /wp-admin/upload.php3.37 ▲0.1435.21 ▲2.33
New MI Carousel /wp-admin/post-new.php?post_type=mi_carousel_slider3.4852.26
MI Carousels /wp-admin/edit-tags.php?taxonomy=mi_carousels&post_type=mi_carousel_slider3.3637.24
All MI Carousels /wp-admin/edit.php?post_type=mi_carousel_slider3.4137.15

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by MI Carousel
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.81 ▼0.548.93 ▲7.0044.07 ▲3.84
Dashboard /wp-admin2,228 ▲515.66 ▼0.0084.31 ▼5.6575.79 ▲32.39
Posts /wp-admin/edit.php2,136 ▲361.99 ▼0.0235.76 ▼6.1034.22 ▼2.36
Add New Post /wp-admin/post-new.php1,569 ▲4123.28 ▲0.32663.36 ▼19.49163.46 ▲109.13
Media Library /wp-admin/upload.php1,430 ▲304.11 ▼0.0496.86 ▼11.2380.28 ▲32.16
New MI Carousel /wp-admin/post-new.php?post_type=mi_carousel_slider2,4576.84159.01124.07
MI Carousels /wp-admin/edit-tags.php?taxonomy=mi_carousels&post_type=mi_carousel_slider1,3862.2526.1029.96
All MI Carousels /wp-admin/edit.php?post_type=mi_carousel_slider1,1071.9130.3231.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/mi-carousel-slider/uninstall.php+22
    Trying to get property 'term_id' of non-object
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mi-carousel-slider/mi-carousel.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_term_by() in wp-content/plugins/mi-carousel-slider/views/slide.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mi-carousel-slider/views/metabox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/mi-carousel-slider/shortcode/mi_carousel.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mi-carousel-slider/inc/kc_mi_carousel.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mi-carousel-slider/views/label.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/mi-carousel-slider/views/taxonomy.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/mi-carousel-slider/views/post_type.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #4 (Banner)
Please take inspiration from this readme.txt

mi-carousel-slider/mi-carousel.php 92% from 13 tests

The entry point to "MI Carousel" version 2.0.3 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mi-carousel-slider.php" instead of "mi-carousel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,702 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11015241,056
PHP109583687
CSS37813442
HTML1384433
Sass15043
SVG11341

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/mi-carousel-slide-icon.png1.14KB0.31KB▼ 73.05%