68% responsive-banner-slider

Code Review | Responsive Banner Slider

WordPress plugin Responsive Banner Slider scored 68% from 54 tests.

About plugin

  • Plugin page: responsive-banner...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 5.8.1
  • First release: Jan 18, 2015
  • Latest release: Jan 18, 2015
  • Number of updates: 4
  • Update frequency: every 2.0 days
  • Top authors: hpinfosys (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,649 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: ▼1.87MB] [CPU: ▼190.54ms] Passed 4 tests

An overview of server-side resources used by Responsive Banner Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.76 ▼1.074.72 ▼32.62
Dashboard /wp-admin1.78 ▼1.275.36 ▼38.13
Posts /wp-admin/edit.php1.78 ▼1.335.66 ▼38.04
Add New Post /wp-admin/post-new.php1.78 ▼3.655.50 ▼653.35
Media Library /wp-admin/upload.php1.78 ▼1.225.51 ▼31.31
Banner Slider /wp-admin/edit.php?post_type=slides1.785.32
Banner Slider /wp-admin/options-general.php?page=slide-rnd-011.786.18
Add New Banner /wp-admin/post-new.php?post_type=slides1.785.18

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 4 new options
New WordPress options
banner_slidereffect
banner_pausetime
banner_transitiontime
banner_prevnextbtn

Browser metrics Passed 4 tests

This is an overview of browser requirements for Responsive Banner Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,844 ▲24816.21 ▲0.6510.92 ▲2.2952.67 ▲3.53
Dashboard /wp-admin3,007 ▲765.88 ▼0.04141.65 ▼14.65153.22 ▲35.35
Posts /wp-admin/edit.php2,783 ▲442.70 ▲0.0068.19 ▼2.8588.21 ▼6.59
Add New Post /wp-admin/post-new.php1,713 ▲3018.83 ▼0.05369.62 ▼25.53123.03 ▼1.33
Media Library /wp-admin/upload.php1,795 ▼155.01 ▲0.00133.70 ▼27.71147.35 ▲23.88
Banner Slider /wp-admin/edit.php?post_type=slides1,4522.6163.8680.00
Banner Slider /wp-admin/options-general.php?page=slide-rnd-011,1722.0952.4469.82
Add New Banner /wp-admin/post-new.php?post_type=slides2,2854.49103.50106.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style 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 banner-slider-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 4 options
    • banner_slidereffect
    • banner_pausetime
    • banner_transitiontime
    • banner_prevnextbtn

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=slides
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style 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 banner-slider-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=slides
    • > User notice in wp-includes/functions.php+5663
    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 banner-slider-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/post-new.php?post_type=slides
    • > Notice in wp-content/plugins/responsive-banner-slider/responsive-banner-slider-post.php+115
    Undefined index: wptuts_slidelink_2_meta_box_nonce
    • > GET request to /wp-admin/post-new.php?post_type=slides
    • > Notice in wp-content/plugins/responsive-banner-slider/responsive-banner-slider-post.php+98
    Undefined index: std

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/responsive-banner-slider/responsive-banner-slider.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/responsive-banner-slider/responsive-banner-slider-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-banner-slider/responsive-banner-slider-post.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/responsive-banner-slider/responsive-banner-slider-shortcode.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (The screenshot description corresponds to screenshot-1.(png|jpg|jpeg|gif).), #2 (The screenshot description corresponds to screenshot-2.(png|jpg|jpeg|gif).), #3 (The screenshot description corresponds to screenshot-3.(png|jpg|jpeg|gif).)
Please take inspiration from this readme.txt

responsive-banner-slider/responsive-banner-slider.php Passed 13 tests

The primary PHP file in "Responsive Banner Slider" version 1.0 is used by WordPress to initiate all plugin functionality
29 characters long description:
Responsive Page Banner Slider

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
Good job! No executable or dangerous file extensions detected1,233 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1130120901
PHP54528271
CSS1122061

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.66KB0.88KB0.00%
css/bullet.png0.82KB0.81KB0.24%
css/next-previous.png0.57KB0.25KB▼ 55.97%