78% slider-bws

Code Review | Slider by BestWebSoft

WordPress plugin Slider by BestWebSoft scored78%from 54 tests.

About plugin

  • Plugin page: slider-bws
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: May 17, 2017
  • Latest release: Aug 11, 2023
  • Number of updates: 20
  • Update frequency: every 114.0 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /8,702 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▲0.76ms] Passed 4 tests

Analyzing server-side resources used by Slider by BestWebSoft
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1244.87 ▲2.18
Dashboard /wp-admin3.48 ▲0.1756.83 ▼3.86
Posts /wp-admin/edit.php3.53 ▲0.1758.00 ▲9.52
Add New Post /wp-admin/post-new.php6.01 ▲0.1395.75 ▼2.31
Media Library /wp-admin/upload.php3.33 ▲0.1143.98 ▲7.01

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 138 new files
Database: 4 new tables, 8 new options
New tables
wp_sldr_category
wp_sldr_slider
wp_sldr_slide
wp_sldr_relation
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
sldr_options
db_upgraded
widget_recent-posts
bstwbsftwppdtplgns_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Slider by BestWebSoft
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,020 ▲24913.98 ▼0.5911.38 ▲9.3747.52 ▲6.94
Dashboard /wp-admin2,318 ▲1304.91 ▼0.95103.25 ▼4.3143.23 ▲4.91
Posts /wp-admin/edit.php2,208 ▲1162.27 ▲0.2538.07 ▼0.9536.87 ▲1.44
Add New Post /wp-admin/post-new.php1,630 ▲11123.57 ▲0.24680.87 ▲65.3466.74 ▲13.84
Media Library /wp-admin/upload.php1,503 ▲1154.24 ▲0.08113.55 ▲7.6749.48 ▲5.01
Slider Categories /wp-admin/slider-categories.php260.440.1014.88
Add New /wp-admin/slider-new.php260.440.117.01
Global Settings /wp-admin/slider-settings.php260.440.087.83
Sliders /wp-admin/slider.php260.440.076.62
BWS Panel /wp-admin/slider.php?page=sldr-bws-panel260.440.096.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/slider-bws/slider-bws.php on line 286
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/slider-bws/slider-bws.php on line 286
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/slider-bws/slider-bws.php on line 286
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/slider-bws/includes/class-sldr-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-bws/bws_menu/class-bws-settings.php:1452
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/slider-bws/bws_menu/product_list.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/slider-categories.php
    • > Network (severe)
    wp-admin/slider-categories.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slider-new.php
    • > Network (severe)
    wp-admin/slider-new.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slider-settings.php
    • > Network (severe)
    wp-admin/slider-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slider.php
    • > Network (severe)
    wp-admin/slider.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slider.php?page=sldr-bws-panel
    • > Network (severe)
    wp-admin/slider.php?page=sldr-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Slider in the front-end.), #2 (Edit Slider page.), #3 (Edit Slider Image Info.), #4 (Slider Global Settings page.), #5 (Slider Separate Settings page.)
You can take inspiration from this readme.txt

slider-bws/slider-bws.php Passed 13 tests

"Slider by BestWebSoft" version 1.0.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
61 characters long description:
Simple and easy to use plugin adds a slider to your web site.

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
Success! There were no dangerous files found in this plugin26,426 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PO File103,6195,2847,992
CSS142373416,475
PHP96609126,043
JavaScript191,2882,4765,766
SVG400150

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity48.67
▷ Minimum class complexity5.00
▷ Maximum class complexity210.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods4688.46%
▷ Protected methods00.00%
▷ Private methods611.54%
Functions87
▷ Named functions87100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
65 PNG files occupy 4.39MB with 2.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_888888_256x240.png6.88KB4.20KB▼ 38.90%
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_glass_75_e6e6e6_1x400.png0.31KB0.18KB▼ 39.81%
images/owl.video.play.png4.86KB2.74KB▼ 43.61%
screenshot-5.png102.70KB37.26KB▼ 63.72%
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_flat_0_aaaaaa_40x100.png0.26KB0.11KB▼ 56.06%