73% saoshyant-slider

Code Review | Saoshyant Slider

WordPress plugin Saoshyant Slider scored73%from 54 tests.

About plugin

  • Plugin page: saoshyant-slider
  • Plugin version: 2.8
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-2.4
  • WordPress version: 6.3.1
  • First release: May 2, 2020
  • Latest release: Jun 20, 2022
  • Number of updates: 427
  • Update frequency: every 1.9 days
  • Top authors: saoshyant1994 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,822 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.27MB] [CPU: ▲2.58ms] Passed 4 tests

Analyzing server-side resources used by Saoshyant Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6042.24 ▲1.93
Dashboard /wp-admin4.85 ▲1.5157.02 ▼1.85
Posts /wp-admin/edit.php4.90 ▲1.5561.06 ▲15.12
Add New Post /wp-admin/post-new.php7.37 ▲1.4890.41 ▼4.87
Media Library /wp-admin/upload.php4.71 ▲1.4851.91 ▲17.17
Add New /wp-admin/post-new.php?post_type=sao_slide4.7044.98
All Slides /wp-admin/edit.php?post_type=sao_slide4.8249.93
Sliders /wp-admin/edit-tags.php?taxonomy=sao_sliders&post_type=sao_slide4.8343.77

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 112 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Saoshyant Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8814.20 ▼0.091.85 ▲0.3435.94 ▼5.12
Dashboard /wp-admin2,227 ▲505.50 ▼0.1780.62 ▼7.6538.94 ▼2.51
Posts /wp-admin/edit.php2,133 ▲301.96 ▼0.0639.21 ▲1.8735.11 ▲0.50
Add New Post /wp-admin/post-new.php1,554 ▲1923.16 ▲4.96664.52 ▲37.0752.14 ▼6.63
Media Library /wp-admin/upload.php1,433 ▲304.20 ▲0.0193.94 ▼1.7139.32 ▼5.38
Add New /wp-admin/post-new.php?post_type=sao_slide2,7716.04145.2755.86
All Slides /wp-admin/edit.php?post_type=sao_slide1,1181.9432.2829.49
Sliders /wp-admin/edit-tags.php?taxonomy=sao_sliders&post_type=sao_slide1,3102.1328.1138.19

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=sao_slide
    • > Warning in wp-content/plugins/saoshyant-slider/saoshyant-slider.php+353
    Use of undefined constant SAOPAGE_DIR - assumed 'SAOPAGE_DIR' (this will throw an Error in a future version of PHP)

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
  • 24× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/saoshyant-slider/framework/perview.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/saoshyant-slider/options/fonts/flaticon_thin.php:846
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/saoshyant-slider/element/text_block.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/saoshyant-slider/elementor_category.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/saoshyant-slider/framework/builder.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/saoshyant-slider/options/responsive.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/saoshyant-slider/element/button.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/saoshyant-slider/framework/builder-code.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/saoshyant-slider/options/fonts/metrizeicon.php:320
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/saoshyant-slider/framework/builder-element.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=sao_slide
    • > Network (severe)
    saopage_dirassets/css/fonts/FontAwesome.css?ver=2.7.3 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

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: custom slider, slider builder

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

The entry point to "Saoshyant Slider" version 2.8 is a PHP file that has certain tags in its header comment area
25 characters long description:
Custom And Builder Slider

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin17,087 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
PHP331,6754348,982
JavaScript121,0843383,858
CSS29396443,703
PO File1264372544

PHP code Passed 2 tests

Analyzing 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.41
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods440.00%
▷ Protected methods660.00%
▷ Private methods00.00%
Functions115
▷ Named functions115100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/image/select.png15.35KB0.20KB▼ 98.70%