10% ab-background-slideshow

Code Review | AB Background Slideshow

WordPress plugin AB Background Slideshow scored 10% from 54 tests.

About plugin

  • Plugin page: ab-background-sli...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.1
  • WordPress version: 6.3.1
  • First release: Sep 22, 2012
  • Latest release: Jan 23, 2018
  • Number of updates: 12
  • Update frequency: every 162.4 days
  • Top authors: abooze (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active / 6,473 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
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/ab-background-slideshow/ab-bg-slideshow.php+55
    Undefined variable: wp_cycle_defaults

Server metrics [RAM: ▼1.90MB] [CPU: ▼51.07ms] Passed 4 tests

This is a short check of server-side resources used by AB Background Slideshow
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.71 ▼35.45
Dashboard /wp-admin2.10 ▼1.207.35 ▼44.78
Posts /wp-admin/edit.php2.10 ▼1.258.05 ▼40.65
Add New Post /wp-admin/post-new.php2.10 ▼3.787.10 ▼83.41
Media Library /wp-admin/upload.php2.10 ▼1.136.86 ▼26.42
AB BG Slideshow /wp-admin/options-general.php?page=ab-bg-slideshow2.107.26

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

AB Background Slideshow: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲24214.22 ▼0.5415.59 ▲13.9442.21 ▼5.84
Dashboard /wp-admin2,211 ▲234.84 ▼1.02108.29 ▼7.4043.10 ▼3.95
Posts /wp-admin/edit.php2,097 ▲82.12 ▲0.0640.35 ▲0.9136.29 ▲1.82
Add New Post /wp-admin/post-new.php1,518 ▼1517.63 ▼5.15691.00 ▲35.9253.64 ▼4.25
Media Library /wp-admin/upload.php1,396 ▲114.22 ▼0.0793.00 ▼7.8142.15 ▼2.13
AB BG Slideshow /wp-admin/options-general.php?page=ab-bg-slideshow7922.0626.7431.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/ab-background-slideshow/ab-bg-slideshow.php+55
    Undefined variable: wp_cycle_defaults
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ab-bg-slideshow
    • > Notice in wp-content/plugins/ab-background-slideshow/ab-bg-slideshow.php+55
    Undefined variable: wp_cycle_defaults
    • > GET request to /wp-admin/options-general.php?page=ab-bg-slideshow
    • > Notice in wp-content/plugins/ab-background-slideshow/ab-bg-slideshow.php+77
    Undefined index: action
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ab-bg-slideshow
    • > Notice in wp-content/plugins/ab-background-slideshow/ab-bg-slideshow.php+154
    Trying to access array offset on value of type bool

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ab-background-slideshow/ab-bg-slideshow.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (AB BG Slideshow admin panel.) image not found
You can look at the official readme.txt

ab-background-slideshow/ab-bg-slideshow.php 92% from 13 tests

The principal PHP file in "AB Background Slideshow" v. 1.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ab-background-slideshow.php" instead of "ab-bg-slideshow.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin845 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript16827531
PHP11444197
CSS2510117

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png79.28KB28.68KB▼ 63.82%
images/bg/page-bottom.png0.61KB0.30KB▼ 50.32%
images/bg/page-bg.png0.19KB0.09KB▼ 49.74%
images/bg/page-top.png0.62KB0.32KB▼ 48.18%