10% rebel-slider

Code Review | Rebel Slider

WordPress plugin Rebel Slider scored10%from 54 tests.

About plugin

  • Plugin page: rebel-slider
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2018
  • Latest release: Jul 29, 2018
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: freelancermartin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /635 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
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/cmb2-slide-effects/cmb2-slide-effect.php+15
    Undefined variable: values

Server metrics [RAM: ▼1.97MB] [CPU: ▼54.75ms] Passed 4 tests

Analyzing server-side resources used by Rebel Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.43 ▼36.48
Dashboard /wp-admin2.05 ▼1.305.42 ▼58.44
Posts /wp-admin/edit.php2.05 ▼1.315.58 ▼37.43
Add New Post /wp-admin/post-new.php2.05 ▼3.846.17 ▼86.63
Media Library /wp-admin/upload.php2.05 ▼1.184.47 ▼28.86
All Sliders /wp-admin/edit.php?post_type=slider2.055.39
Add New Slider /wp-admin/post-new.php?post_type=slider2.056.45
Welcome Rebel Slider Page /wp-admin/plugins.php?page=rebel_slider_welcome_page2.055.25
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins2.057.11

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 443 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Rebel Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,001 ▲24014.16 ▼0.3910.07 ▲8.3642.34 ▼2.22
Dashboard /wp-admin2,296 ▲1165.93 ▲0.3699.50 ▲5.5846.12 ▲1.82
Posts /wp-admin/edit.php2,191 ▲912.50 ▲0.4940.65 ▲5.0735.74 ▲1.51
Add New Post /wp-admin/post-new.php1,611 ▲8523.81 ▲0.56716.47 ▲6.6838.03 ▼16.26
Media Library /wp-admin/upload.php1,509 ▲1064.72 ▲0.56112.73 ▲1.2148.25 ▼0.07
All Sliders /wp-admin/edit.php?post_type=slider1,1642.4639.4831.64
Add New Slider /wp-admin/post-new.php?post_type=slider1,7322.8666.7147.48
Welcome Rebel Slider Page /wp-admin/plugins.php?page=rebel_slider_welcome_page1,0582.1428.9043.36
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0682.1228.5829.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/cmb2-slide-effects/cmb2-slide-effect.php+15
    Undefined variable: values
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=tgmpa-install-plugins
    • > Notice in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/cmb2-slide-effects/cmb2-slide-effect.php+15
    Undefined variable: values
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=tgmpa-install-plugins
    • > Notice in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/cmb2-slide-effects/cmb2-slide-effect.php+16
    Undefined variable: slider_nr
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=tgmpa-install-plugins
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jssor slider handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=tgmpa-install-plugins
    • > Warning in wp-content/plugins/rebel-slider/includes/class-rebel-slider.php+240
    Use of undefined constant RS_PLUGIN_FILE - assumed 'RS_PLUGIN_FILE' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=tgmpa-install-plugins
    • > Warning in wp-content/plugins/rebel-slider/admin/plugin-welcome/welcome-init.php+58
    Use of undefined constant RB_PLUGIN_FILE - assumed 'RB_PLUGIN_FILE' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=rebel_slider_welcome_page
    • > Notice in wp-content/plugins/rebel-slider/admin/plugin-welcome/welcome-logic.php+141
    Undefined variable: img_url

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/rebel-slider/admin/cmb2-add-ons/cmb2-slide-effects/cmb2-slide-effect.php
    • > /wp-content/plugins/rebel-slider/public/class-rebel-slider-stylesheet.php
    • > /wp-content/plugins/rebel-slider/admin/partials/rebel-slider-admin-display.php
    • > /wp-content/plugins/rebel-slider/public/class-rebel-slider-function.php
    • > /wp-content/plugins/rebel-slider/public/partials/plugin-rebel-slider-display.php
  • 46× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/CMB2/includes/CMB2_hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/CMB2/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/CMB2/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/CMB2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/rebel-slider/admin/plugin-metaboxes.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/CMB2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/CMB2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/CMB2/includes/types/CMB2_Type_Text_Time.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/CMB2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rebel-slider/admin/cmb2-add-ons/CMB2/includes/helper-functions.php:127

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=tgmpa-install-plugins
    • > Network (severe)
    wp-content/themes/twentytwentyone/assets/js/jssor.slider.min.js?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/plugins.php?page=rebel_slider_welcome_page
    • > Network (severe)
    wp-admin/arrow-down-left-right.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/plugins.php?page=rebel_slider_welcome_page
    • > Network (severe)
    wp-admin/arrow-down-right.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
Attributes that require attention:
  • Donate link: Invalid url: "developerforwebsites.com"
  • Plugin Name: Please specify the plugin name on the first line ( === rebel-slider === )
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in rebel-slider/assets to your readme.txt
You can look at the official readme.txt

rebel-slider/rebel-slider.php 92% from 13 tests

The principal PHP file in "Rebel Slider" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 399 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin55,722 lines of code in 260 files:
LanguageFilesBlank linesComment linesLines of code
PO File13715,23119,87536,386
PHP813,3758,58911,417
CSS151,1741,1785,128
Sass15291251,330
JavaScript93023061,151
Markdown3750310

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity18.82
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes87
▷ Abstract classes89.20%
▷ Concrete classes7990.80%
▷ Final classes00.00%
Methods676
▷ Static methods8913.17%
▷ Public methods55682.25%
▷ Protected methods10916.12%
▷ Private methods111.63%
Functions57
▷ Named functions57100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants527.78%
▷ Class constants1372.22%
▷ Public constants13100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
21 PNG files occupy 2.18MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/SliderRingArrow.png15.62KB5.21KB▼ 66.64%
admin/cmb2-add-ons/CMB2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
admin/cmb2-add-ons/CMB2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
admin/cmb2-add-ons/CMB2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
admin/cmb2-add-ons/CMB2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%