10% bx-slider-by-trs

Code Review | BX Slider by TRS

WordPress plugin BX Slider by TRS scored10%from 54 tests.

About plugin

  • Plugin page: bx-slider-by-trs
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2017
  • Latest release: Oct 28, 2022
  • Number of updates: 24
  • Update frequency: every 81.9 days
  • Top authors: alishanvr (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /1,663 total downloads

Benchmarks

Plugin footprint 40% 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
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/bx-slider-by-trs/backend/classes/class-bootstrap.php+42
    Constant BACKEND_DIR already defined

Server metrics [RAM: ▼1.70MB] [CPU: ▼54.78ms] Passed 4 tests

A check of server-side resources used by BX Slider by TRS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.165.81 ▼32.44
Dashboard /wp-admin2.32 ▼1.036.61 ▼51.56
Posts /wp-admin/edit.php2.32 ▼1.046.81 ▼42.37
Add New Post /wp-admin/post-new.php2.32 ▼3.577.49 ▼92.75
Media Library /wp-admin/upload.php2.32 ▼0.916.79 ▼26.06
About /wp-admin/edit.php?post_type=trs-bx-slider&page=trs-bx-slider-about2.326.12
All Sliders /wp-admin/edit.php?post_type=trs-bx-slider2.327.01
Add New Slider /wp-admin/post-new.php?post_type=trs-bx-slider2.326.13

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

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

Browser metrics Passed 4 tests

A check of browser resources used by BX Slider by TRS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,083 ▲33715.13 ▲0.766.09 ▲4.5447.17 ▲7.40
Dashboard /wp-admin2,371 ▲1806.43 ▲0.58121.71 ▲18.4136.89 ▼6.10
Posts /wp-admin/edit.php2,284 ▲1953.35 ▲1.3351.12 ▲14.7531.19 ▼5.13
Add New Post /wp-admin/post-new.php1,557 ▲2423.18 ▲0.14621.36 ▼22.7936.68 ▼12.34
Media Library /wp-admin/upload.php1,416 ▲284.15 ▼0.1079.55 ▼18.5739.23 ▼2.26
About /wp-admin/edit.php?post_type=trs-bx-slider&page=trs-bx-slider-about1,0043.0240.8157.13
All Sliders /wp-admin/edit.php?post_type=trs-bx-slider1,2663.5246.8626.55
Add New Slider /wp-admin/post-new.php?post_type=trs-bx-slider2,1283.6363.3282.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/bx-slider-by-trs/backend/classes/class-bootstrap.php+42
    Constant BACKEND_DIR already defined
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=trs-bx-slider
    • > Notice in wp-content/plugins/bx-slider-by-trs/backend/classes/class-bootstrap.php+42
    Constant BACKEND_DIR already defined
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=trs-bx-slider
    • > Notice in wp-content/plugins/bx-slider-by-trs/backend/classes/class-bootstrap.php+43
    Constant BACKEND_URL already defined
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=trs-bx-slider
    • > Notice in wp-content/plugins/bx-slider-by-trs/backend/classes/class-bootstrap.php+44
    Constant BACKEND_ASSET_DIR already defined
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=trs-bx-slider
    • > Notice in wp-content/plugins/bx-slider-by-trs/backend/classes/class-bootstrap.php+45
    Constant BACKEND_ASSET_URL already defined
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=trs-bx-slider
    • > Notice in wp-content/plugins/bx-slider-by-trs/backend/classes/class-bootstrap.php+46
    Constant BACKEND_INCLUDES_DIR already defined

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Please fix this invalid url: "#"
  • Screenshots: These screenshots need descriptions #1, #10, #11, #2, #3, #4, #5, #6, #7, #8, #9 in bx-slider-by-trs/assets to your readme.txt
You can look at the official readme.txt

bx-slider-by-trs/bootstrap.php 85% from 13 tests

The main file in "BX Slider by TRS" v. 2.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("bx-slider-by-trs.php" instead of "bootstrap.php")

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 detected1,144 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP1127498780
JavaScript65696283
CSS317081

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.88
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods51
▷ Static methods1019.61%
▷ Public methods4486.27%
▷ Protected methods47.84%
▷ Private methods35.88%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
backend/assets/images/controls.png2.74KB1.42KB▼ 48.29%
frontend/assets/images/controls.png2.74KB1.42KB▼ 48.29%
frontend/assets/images/ext-not-supported.png23.99KB11.36KB▼ 52.62%