67% visual-slider

Code Review | visualslider Sldier

WordPress plugin visualslider Sldier scored67%from 54 tests.

About plugin

  • Plugin page: visual-slider
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 24, 2023
  • Latest release: Sep 23, 2023
  • Number of updates: 115
  • Update frequency: every 5.1 days
  • Top authors: dastan800 (100%)plugin-maste (1.74%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /347 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.51MB] [CPU: ▲19.24ms] Passed 4 tests

Server-side resources used by visualslider Sldier
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5649.39 ▲3.04
Dashboard /wp-admin5.15 ▲1.8184.66 ▲13.19
Posts /wp-admin/edit.php5.20 ▲1.8584.79 ▲35.25
Add New Post /wp-admin/post-new.php7.71 ▲1.83128.88 ▲30.01
Media Library /wp-admin/upload.php5.08 ▲1.8579.26 ▲30.73
Add New /wp-admin/post-new.php?post_type=visualslider5.28108.26
All Sliders /wp-admin/edit.php?post_type=visualslider5.1270.69

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 340 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_visualslider
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for visualslider Sldier
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲15713.38 ▼0.7810.00 ▲7.6144.34 ▼0.26
Dashboard /wp-admin2,235 ▲555.80 ▲0.1293.23 ▲7.0142.55 ▲6.26
Posts /wp-admin/edit.php2,137 ▲342.04 ▲0.0136.86 ▲0.6332.34 ▼3.49
Add New Post /wp-admin/post-new.php1,559 ▲3323.64 ▼0.18703.02 ▲26.7855.54 ▼2.74
Media Library /wp-admin/upload.php1,437 ▲374.27 ▲0.0798.83 ▼17.9344.24 ▼3.91
Add New /wp-admin/post-new.php?post_type=visualslider3,9714.93160.73223.47
All Sliders /wp-admin/edit.php?post_type=visualslider1,1091.9833.4133.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_visualslider
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 0% 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 server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=visualslider
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/visual-slider/admin/includes/perview-global.php+92
    Trying to get property 'ID' of non-object

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/visual-slider/assets/css/phpfonts/flaticonarrow.php
  • 100× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visual-slider/layer/mini/position_size.php:6
    • > PHP Warning
      include_once(): Failed opening 'VISUALSLIDER_PATHadmin/setting-options.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/visual-slider/admin/index.php on line 2
    • > PHP Warning
      include_once(): Failed opening 'VISUALSLIDER_PATHadmin/includes/template.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/visual-slider/admin/index.php on line 12
    • > PHP Warning
      Use of undefined constant VISUALSLIDER_PATH - assumed 'VISUALSLIDER_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/visual-slider/admin/index.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-slider/admin/index.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-slider/admin/includes/slide.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visual-slider/layer/mini/text_typography.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-slider/admin/includes/layer.php:17
    • > PHP Warning
      include_once(VISUALSLIDER_PATHadmin/includes/perview-glider-css.php): failed to open stream: No such file or directory in wp-content/plugins/visual-slider/admin/index.php on line 15
    • > PHP Warning
      Use of undefined constant VISUALSLIDER_PATH - assumed 'VISUALSLIDER_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/visual-slider/admin/index.php on line 18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=visualslider
    • > Network (severe)
    wp-content/plugins/visual-slider/admin/assets/css/admin-setting.css?ver=5560650 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: slider builder, custom slider

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

"visualslider Sldier" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
17 characters long description:
Responsive Slider

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 plugin21,181 lines of code in 100 files:
LanguageFilesBlank linesComment linesLines of code
PHP552,44665510,807
CSS298982175,163
JavaScript141,5639714,535
PO File1314480656
SVG10020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity7.33
▷ Minimum class complexity6.00
▷ Maximum class complexity8.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1076.92%
▷ Protected methods323.08%
▷ Private methods00.00%
Functions159
▷ Named functions159100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
62 PNG files occupy 1.11MB with 0.57MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/image/background.png17.41KB0.09KB▼ 99.48%
admin/assets/image/floppy-disk.png8.33KB3.49KB▼ 58.05%
admin/assets/image/cancel.png19.91KB8.96KB▼ 55.01%
admin/assets/image/exchange.png8.42KB9.05KB0.00%
admin/assets/image/download.png6.71KB3.70KB▼ 44.89%