10% jquery-banner-rotate

Code Review | jQuery Banner Rotate

WordPress plugin jQuery Banner Rotate scored10%from 54 tests.

About plugin

  • Plugin page: jquery-banner-rotate
  • Plugin version: 4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2014
  • Latest release: Feb 27, 2015
  • Number of updates: 25
  • Update frequency: every 15.8 days
  • Top authors: pedromjava (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /3,984 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/jquery-banner-rotate/jbr-widget.php+215
    Function create_function() is deprecated

Server metrics [RAM: ▼14.53MB] [CPU: ▼2,654,259.02ms] Passed 4 tests

An overview of server-side resources used by jQuery Banner Rotate
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.34 ▼52.519.93 ▼10,616,846.05
Dashboard /wp-admin2.36 ▼0.999.77 ▼45.07
Posts /wp-admin/edit.php2.37 ▼1.049.10 ▼45.36
Add New Post /wp-admin/post-new.php2.36 ▼3.578.14 ▼99.58
Media Library /wp-admin/upload.php2.36 ▼0.918.38 ▼26.60
New Banner /wp-admin/admin.php?page=jbr-new-banner2.368.43
All Sliders /wp-admin/admin.php?page=jbr-all-sliders2.369.19
jQuery Banner Rotate /wp-admin/admin.php?page=jquery-banner-rotate2.368.72
All Banners /wp-admin/admin.php?page=jbr-all-banners2.368.92
New Slider /wp-admin/admin.php?page=jbr-new-slider2.369.74

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 50 new files
Database: 2 new tables, 9 new options
New tables
wp_banners
wp_banner_sliders
New WordPress options
jbr_hash_key
jbr_active_notices
widget_jbrwidget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by jQuery Banner Rotate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,090 ▲32914.90 ▲0.637.33 ▲5.4339.79 ▼5.57
Dashboard /wp-admin2,370 ▲1896.20 ▲0.43119.31 ▲17.0189.60 ▲44.15
Posts /wp-admin/edit.php2,326 ▲2263.39 ▲1.4253.55 ▲13.3083.32 ▲45.89
Add New Post /wp-admin/post-new.php1,573 ▲4723.69 ▲0.36650.54 ▲2.83173.57 ▲119.20
Media Library /wp-admin/upload.php1,454 ▲574.12 ▼0.0787.51 ▼12.4986.66 ▲42.17
New Banner /wp-admin/admin.php?page=jbr-new-banner1,1303.0441.2363.51
All Sliders /wp-admin/admin.php?page=jbr-all-sliders1,0363.0239.3062.04
jQuery Banner Rotate /wp-admin/admin.php?page=jquery-banner-rotate1,2513.1740.0982.92
All Banners /wp-admin/admin.php?page=jbr-all-banners1,0423.0939.0161.85
New Slider /wp-admin/admin.php?page=jbr-new-slider1,1313.0539.7073.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/jquery-banner-rotate/jbr-widget.php+215
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_jbrwidget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jbr-new-slider
    • > Deprecated in wp-content/plugins/jquery-banner-rotate/jbr-widget.php+215
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jbr-new-slider
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in JBRWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/admin.php?page=jbr-new-banner
    • > Notice in wp-content/plugins/jquery-banner-rotate/menus/class.jquerybannerrotatemenu.php+175
    Undefined variable: banner
  • 63 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jbr-new-slider
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 63 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jbr-new-slider
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
    • > GET request to /wp-admin/admin.php?page=jbr-new-slider
    • > Notice in wp-content/plugins/jquery-banner-rotate/menus/class.jquerybannerrotatemenu.php+262
    Undefined variable: slider

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jquery-banner-rotate/js/cycle/transition-plugins/transitions.php
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/jquery-banner-rotate/class/db/class.jbrslider.php on line 5
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/jquery-banner-rotate/js/cycle/transition-plugins/transitions.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/jquery-banner-rotate/class/db/class.jbrbanner.php on line 5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/jquery-banner-rotate/class/db/class.jbrslider.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function jbr_the_translate() in wp-content/plugins/jquery-banner-rotate/menus/banner/new.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/jquery-banner-rotate/jbr-shortcode.php:168
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/jquery-banner-rotate/jbr-functions.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function jbr_the_translate() in wp-content/plugins/jquery-banner-rotate/menus/slider/new.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function jbr_hash_value() in wp-content/plugins/jquery-banner-rotate/menus/banner/edit.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/jquery-banner-rotate/jbr-widget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=jquery-banner-rotate
    • > Network (severe)
    wp-content/plugins/jquery-banner-rotate/css/banner-rotativo.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: date, shortcode, widget, rotate, banner...

jquery-banner-rotate/jquery-banner-rotate.php Passed 13 tests

Analyzing the main PHP file in "jQuery Banner Rotate" version 4.1
72 characters long description:
You can create Sliders with images that can have expiration date or not.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin4,374 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript193721282,208
PHP17210101,785
CSS6341214
PO File1792167

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods44
▷ Static methods00.00%
▷ Public methods4295.45%
▷ Protected methods00.00%
▷ Private methods24.55%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to 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
img/tinymce-button.png1.96KB1.15KB▼ 41.26%
img/logo.png0.70KB0.45KB▼ 35.79%
img/controls.png2.08KB2.04KB▼ 1.55%