10% b26-slider

Code Review | B26 Slider

WordPress plugin B26 Slider scored10%from 54 tests.

About plugin

  • Plugin page: b26-slider
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Aug 23, 2016
  • Latest release: Aug 26, 2016
  • Number of updates: 11
  • Update frequency: every 11.6 days
  • Top authors: infodesignbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /670 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/b26-slider/b26slider.php+218
    Trying to access array offset on value of type null

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.25ms] Passed 4 tests

An overview of server-side resources used by B26 Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.56 ▼4.12
Dashboard /wp-admin3.36 ▲0.0544.75 ▼5.34
Posts /wp-admin/edit.php3.40 ▲0.0446.64 ▼0.24
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.85 ▼15.94
Media Library /wp-admin/upload.php3.27 ▲0.0433.98 ▼3.61
B26 Slider /wp-admin/edit.php?post_type=b26slider_post3.3235.12
Category /wp-admin/edit-tags.php?taxonomy=bitm_post_cat&post_type=b26slider_post3.2729.73
Add New /wp-admin/post-new.php?post_type=b26slider_post3.3648.96
Settings /wp-admin/edit.php?post_type=b26slider_post&page=b26slider-settings3.2430.84

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_b26_sliderc

Browser metrics Passed 4 tests

This is an overview of browser requirements for B26 Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲16714.08 ▼0.299.27 ▲7.1238.82 ▼8.55
Dashboard /wp-admin2,241 ▲504.84 ▼0.06104.12 ▼6.4740.37 ▼3.08
Posts /wp-admin/edit.php2,124 ▲352.01 ▼0.0340.68 ▲1.0937.12 ▲3.69
Add New Post /wp-admin/post-new.php1,571 ▲4318.17 ▼5.07650.85 ▼39.6154.14 ▼7.85
Media Library /wp-admin/upload.php1,423 ▲354.21 ▲0.0494.25 ▼7.9342.98 ▼2.72
B26 Slider /wp-admin/edit.php?post_type=b26slider_post1,1052.0031.4430.52
Category /wp-admin/edit-tags.php?taxonomy=bitm_post_cat&post_type=b26slider_post1,2942.1426.7125.41
Add New /wp-admin/post-new.php?post_type=b26slider_post1,7773.6766.2534.34
Settings /wp-admin/edit.php?post_type=b26slider_post&page=b26slider-settings9441.6825.2828.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_b26_sliderc

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/b26-slider/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/b26-slider/b26slider.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
The official readme.txt might help

b26-slider/b26slider.php 85% from 13 tests

"B26 Slider" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("b26-slider.php" instead of "b26slider.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin415 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP29660299
CSS134115
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.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
There are no PNG files in this plugin