84% no-bs-image-slider

Code Review | No BS Image Slider

WordPress plugin No BS Image Slider scored84%from 54 tests.

About plugin

  • Plugin page: no-bs-image-slider
  • Plugin version: 1.8
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Jul 8, 2020
  • Latest release: Feb 14, 2022
  • Number of updates: 13
  • Update frequency: every 45.1 days
  • Top authors: jweathe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /583 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.28ms] Passed 4 tests

An overview of server-side resources used by No BS Image Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1045.67 ▲1.31
Dashboard /wp-admin3.41 ▲0.1052.41 ▲0.30
Posts /wp-admin/edit.php3.46 ▲0.1051.34 ▲0.64
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.55 ▼13.57
Media Library /wp-admin/upload.php3.33 ▲0.1036.38 ▼0.49
Image Sliders /wp-admin/edit-tags.php?taxonomy=no_bs_image_slider&post_type=no_bs_image_slide3.3235.08
Add New /wp-admin/post-new.php?post_type=no_bs_image_slide3.4050.72
Image Slides /wp-admin/edit.php?post_type=no_bs_image_slide3.3739.07

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_no-bs-slideshow-widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

No BS Image Slider: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.34 ▼0.041.87 ▲0.1444.53 ▲4.04
Dashboard /wp-admin2,226 ▲495.52 ▼0.1796.45 ▲5.8841.55 ▼1.12
Posts /wp-admin/edit.php2,131 ▲282.00 ▲0.0139.29 ▲1.0935.47 ▲0.56
Add New Post /wp-admin/post-new.php1,589 ▲4418.15 ▼5.08642.64 ▼49.4154.86 ▼4.21
Media Library /wp-admin/upload.php1,434 ▲344.23 ▼0.0699.65 ▼9.9943.84 ▼3.30
Image Sliders /wp-admin/edit-tags.php?taxonomy=no_bs_image_slider&post_type=no_bs_image_slide1,2772.1531.4729.30
Add New /wp-admin/post-new.php?post_type=no_bs_image_slide1,7783.9867.5933.79
Image Slides /wp-admin/edit.php?post_type=no_bs_image_slide1,0741.9633.3630.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_no-bs-slideshow-widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/no-bs-image-slider/plugin.php:197

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === no-bs-image-slider === )
The official readme.txt might help

no-bs-image-slider/plugin.php 92% from 13 tests

The main PHP file in "No BS Image Slider" ver. 1.8 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("no-bs-image-slider.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin369 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14821296
CSS110073

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions654.55%
▷ Anonymous functions545.45%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin