84% os-bxslider

Code Review | OS BXSlider

WordPress plugin OS BXSlider scored84%from 54 tests.

About plugin

  • Plugin page: os-bxslider
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7.4
  • WordPress version: 6.3.1
  • First release: Jul 29, 2015
  • Latest release: Apr 24, 2017
  • Number of updates: 21
  • Update frequency: every 30.3 days
  • Top authors: offshorent (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼0.18ms] Passed 4 tests

A check of server-side resources used by OS BXSlider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1752.71 ▲10.27
Dashboard /wp-admin3.50 ▲0.2049.04 ▼1.31
Posts /wp-admin/edit.php3.60 ▲0.2553.14 ▲1.91
Add New Post /wp-admin/post-new.php6.19 ▲0.3197.04 ▼3.94
Media Library /wp-admin/upload.php3.44 ▲0.2137.75 ▲2.63
OS BXSlider /wp-admin/edit.php?post_type=os_bxslider3.5343.83
Add New /wp-admin/post-new.php?post_type=os_bxslider3.5951.83

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by OS BXSlider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲11713.21 ▼1.193.74 ▲1.5342.68 ▼2.90
Dashboard /wp-admin2,233 ▲455.86 ▲0.9899.26 ▼8.8239.58 ▼5.61
Posts /wp-admin/edit.php2,116 ▲272.07 ▲0.0439.14 ▲2.2936.77 ▲2.92
Add New Post /wp-admin/post-new.php1,561 ▲2623.27 ▲0.07679.87 ▲0.2853.94 ▼2.50
Media Library /wp-admin/upload.php1,412 ▲244.21 ▲0.03109.15 ▼0.4548.22 ▼1.15
OS BXSlider /wp-admin/edit.php?post_type=os_bxslider1,2653.4744.2326.96
Add New /wp-admin/post-new.php?post_type=os_bxslider2,7753.7569.2145.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'osBxSliderPostTypes' not found in wp-content/plugins/os-bxslider/includes/admin/meta-boxes/views/os-bxslider.general.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osBxSliderPostTypes' not found in wp-content/plugins/os-bxslider/includes/admin/meta-boxes/views/os-bxslider.carousel.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osBxSliderPostTypes' not found in wp-content/plugins/os-bxslider/includes/admin/meta-boxes/views/os-bxslider.auto.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osBxSliderPostTypes' not found in wp-content/plugins/os-bxslider/includes/admin/meta-boxes/views/os-bxslider.shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osBxSliderPostTypes' not found in wp-content/plugins/os-bxslider/includes/admin/meta-boxes/views/os-bxslider.type.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osBxSliderPostTypes' not found in wp-content/plugins/os-bxslider/includes/admin/meta-boxes/views/os-bxslider.design.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osBxSliderPostTypes' not found in wp-content/plugins/os-bxslider/includes/admin/meta-boxes/views/os-bxslider.pager.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osBxSliderPostTypes' not found in wp-content/plugins/os-bxslider/includes/admin/meta-boxes/views/os-bxslider.controls.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osBxSliderPostTypes' not found in wp-content/plugins/os-bxslider/includes/admin/meta-boxes/views/os-bxslider.slide.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (OS BXSlider slider listing interface), #2 (OS BXSlider add new slider interface), #3 (OS BXSlider - Slider with captions), #4 (OS BXSlider - Carousel), #5 (OS BXSlider - Thumbnail), #6 (OS BXSlider - Ticker)
Please take inspiration from this readme.txt

os-bxslider/os-bxslider.php Passed 13 tests

The primary PHP file in "OS BXSlider" version 2.6 is used by WordPress to initiate all plugin functionality
101 characters long description:
Creates a responsive slider using bxslider. WordPress plugin develop by Offshorent Softwares Pvt Ltd.

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
No dangerous file extensions were detected2,101 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP202644191,128
JavaScript470478807
CSS33522166

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.64
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods54
▷ Static methods35.56%
▷ Public methods5296.30%
▷ Protected methods00.00%
▷ Private methods23.70%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 1.41MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/thumbnail.png0.34KB0.13KB▼ 62.11%
images/delete.png0.46KB0.54KB0.00%
images/down.png0.68KB0.76KB0.00%
images/slider_caption.png0.58KB0.39KB▼ 32.72%
screenshot-3.png380.57KB113.70KB▼ 70.12%