52% banner-slider

Code Review | Banner Slider

WordPress plugin Banner Slider scored52%from 54 tests.

About plugin

  • Plugin page: banner-slider
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-4.3
  • WordPress version: 6.3.1
  • First release: Jan 10, 2011
  • Latest release: Apr 6, 2016
  • Number of updates: 13
  • Update frequency: every 147.2 days
  • Top authors: manjurul.cis (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /10,346 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.88MB] [CPU: ▼34.14ms] Passed 4 tests

This is a short check of server-side resources used by Banner Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0838.16 ▼3.55
Dashboard /wp-admin3.06 ▼0.2422.17 ▼28.00
Posts /wp-admin/edit.php3.06 ▼0.2923.77 ▼20.89
Add New Post /wp-admin/post-new.php3.06 ▼2.8222.78 ▼77.66
Media Library /wp-admin/upload.php3.06 ▼0.1624.44 ▼10.02
Manage Banners /wp-admin/admin.php?page=aj_manage_banners3.0625.07
Slider Option /wp-admin/admin.php?page=aj_slider_option3.0623.12

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, 8 new options
New tables
wp_banner
New WordPress options
widget_recent-posts
aj_slideshow_height
aj_slideshow_width
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Banner Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.20 ▼1.181.75 ▲0.0342.58 ▼8.04
Dashboard /wp-admin2,236 ▲516.02 ▲0.20106.37 ▲4.9340.58 ▲1.19
Posts /wp-admin/edit.php2,113 ▲241.98 ▼0.2036.02 ▲0.8331.09 ▼8.61
Add New Post /wp-admin/post-new.php1,541 ▲723.40 ▲0.25679.53 ▲50.0749.49 ▲0.56
Media Library /wp-admin/upload.php1,412 ▲304.19 ▼0.0299.00 ▲0.6346.29 ▲3.69
Manage Banners /wp-admin/admin.php?page=aj_manage_banners1,8103.0749.4245.54
Slider Option /wp-admin/admin.php?page=aj_slider_option8822.2124.0324.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_banner
  • The uninstall procedure has failed, leaving 8 options in the database
    • aj_slideshow_width
    • widget_recent-posts
    • aj_slideshow_height
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% 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
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aj_slider_option
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aj_manage_banners
    • > Notice in wp-content/plugins/banner-slider/banner_slider.php+125
    Undefined index: task
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aj_manage_banners
    • > Notice in wp-content/plugins/banner-slider/banner_slider.php+169
    Undefined index: mode

SRP 50% 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/banner-slider/banner_slider.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aj_manage_banners
    • > Network (severe)
    wp-content/plugins/banner_slider/jquery-1.3.2.min.js - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (2.)
The official readme.txt might help

banner-slider/banner_slider.php 92% from 13 tests

The main file in "Banner Slider" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("banner-slider.php" instead of "banner_slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected879 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1123129521
JavaScript23667358

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions11
▷ Named functions11100.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Screenshot_2.png21.72KB12.26KB▼ 43.56%
Screenshot_1.png11.06KB4.35KB▼ 60.64%