72% wc-basic-slider

Code Review | Category slider for WooCommerce

WordPress plugin Category slider for WooCommerce scored 72% from 54 tests.

About plugin

  • Plugin page: wc-basic-slider
  • Plugin version: 2.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 15, 2020
  • Latest release: Sep 30, 2023
  • Number of updates: 26
  • Update frequency: every 45.1 days
  • Top authors: mamunur105 (69.23%)tinysolution (34.62%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 718 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.51MB] [CPU: ▼2.05ms] Passed 4 tests

This is a short check of server-side resources used by Category slider for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5141.94 ▼1.30
Dashboard /wp-admin3.82 ▲0.5251.77 ▲2.61
Posts /wp-admin/edit.php3.87 ▲0.5160.61 ▲11.44
Add New Post /wp-admin/post-new.php6.47 ▲0.5895.23 ▼14.88
Media Library /wp-admin/upload.php3.72 ▲0.4940.24 ▲5.39
Add New /wp-admin/post-new.php?post_type=bs_slider3.9160.48
All Sliders /wp-admin/edit.php?post_type=bs_slider3.7947.02

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 623 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
bsfw_plugin_activation_time
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Category slider for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,048 ▲29119.08 ▲4.701.70 ▼0.3837.31 ▼5.42
Dashboard /wp-admin2,455 ▲2709.32 ▲4.42227.51 ▲123.3353.66 ▲12.92
Posts /wp-admin/edit.php2,379 ▲2906.47 ▲4.4489.28 ▲47.7939.48 ▲3.75
Add New Post /wp-admin/post-new.php1,658 ▲11820.31 ▼2.91677.95 ▲86.2936.61 ▼26.87
Media Library /wp-admin/upload.php1,513 ▲1286.85 ▲2.62115.12 ▲17.3246.09 ▲2.88
Add New /wp-admin/post-new.php?post_type=bs_slider2,1809.48193.9358.58
All Sliders /wp-admin/edit.php?post_type=bs_slider1,3556.5087.6334.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • bsfw_plugin_activation_time
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wc-basic-slider/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
    • > /wp-content/plugins/wc-basic-slider/lib/Admin/Dependencies.php
  • 214× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/wc-basic-slider/vendor/htmlburger/carbon-fields/core/Field/Block_Preview_Field.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/wc-basic-slider/vendor/htmlburger/carbon-fields/core/Field/Checkbox_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Datastore\\Datastore_Holder_Interface' not found in wp-content/plugins/wc-basic-slider/vendor/htmlburger/carbon-fields/core/Container/Container.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wc-basic-slider/templates/category_slider_1.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\User_Role_Condition' not found in wp-content/plugins/wc-basic-slider/vendor/htmlburger/carbon-fields/core/Container/Condition/Current_User_Role_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Textarea_Field' not found in wp-content/plugins/wc-basic-slider/vendor/htmlburger/carbon-fields/core/Field/Rich_Text_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/wc-basic-slider/vendor/htmlburger/carbon-fields/core/Service/Legacy_Storage_Service_v_1_5.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-basic-slider/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Widget\\Widget' not found in wp-content/plugins/wc-basic-slider/vendor/htmlburger/carbon-fields/core/Widget.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-basic-slider/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=bs_slider
    • > Console-api (warning) in wp-content/plugins/wc-basic-slider/vendor/htmlburger/carbon-fields/build/classic/vendor.min.js?ver=3.6.0+48:54975
    wp.compose.withState is deprecated since version 5.8. Please use wp.element.useState instead.

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

wc-basic-slider/basic-slider.php 77% from 13 tests

The primary PHP file in "Category slider for WooCommerce" version 2.1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-basic-slider.php" instead of "basic-slider.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.4" instead of "7.0")

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
There were no executable files found in this plugin36,668 lines of code in 550 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1807,10010,94716,206
PHP2703,4108,20413,013
PO File288981,1112,411
CSS132431,1752,310
Sass4936531,868
JSON400681
YAML3300111
Markdown324068

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.88
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces29
Interfaces5
Traits0
Classes238
▷ Abstract classes125.04%
▷ Concrete classes22694.96%
▷ Final classes20.88%
Methods1,088
▷ Static methods11410.48%
▷ Public methods86479.41%
▷ Protected methods20318.66%
▷ Private methods211.93%
Functions111
▷ Named functions2219.82%
▷ Anonymous functions8980.18%
Constants43
▷ Global constants1432.56%
▷ Class constants2967.44%
▷ Public constants29100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/grid.png0.13KB0.13KB0.00%
assets/images/overlay-content.png7.96KB4.10KB▼ 48.47%
assets/images/slider.png0.17KB0.17KB0.00%
assets/images/below-content.png9.75KB4.75KB▼ 51.23%