84% woo-slider-pro-drag-drop-slider-builder-for-woocommerce

Code Review | Woo Slider Pro - Drag Drop Slider Builder For WooCommerce

WordPress plugin Woo Slider Pro - Drag Drop Slider Builder For WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: woo-slider-pro-dr...
  • Plugin version: 1.12
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.3
  • WordPress version: 6.3.1
  • First release: Oct 9, 2018
  • Latest release: Dec 11, 2019
  • Number of updates: 7
  • Update frequency: every 61.4 days
  • Top authors: bc2018 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 12,317 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼1.78ms] Passed 4 tests

A check of server-side resources used by Woo Slider Pro - Drag Drop Slider Builder For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3242.22 ▲2.23
Dashboard /wp-admin3.45 ▲0.1447.91 ▲1.36
Posts /wp-admin/edit.php3.56 ▲0.2049.70 ▲2.63
Add New Post /wp-admin/post-new.php6.03 ▲0.1484.23 ▼13.33
Media Library /wp-admin/upload.php3.37 ▲0.1436.59 ▲3.97

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Woo Slider Pro - Drag Drop Slider Builder For WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.18 ▼1.411.79 ▲0.2744.52 ▲1.74
Dashboard /wp-admin2,206 ▲154.84 ▼0.05110.81 ▲11.3439.32 ▼4.19
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0736.50 ▲2.3334.53 ▲0.16
Add New Post /wp-admin/post-new.php1,520 ▼1423.16 ▼0.04649.52 ▲37.1350.15 ▲2.20
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.02113.99 ▲13.4948.28 ▲2.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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 following issues need your attention
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/woo-slider-pro-drag-drop-slider-builder-for-woocommerce/inc/shortcode.php:9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-slider-pro-drag-drop-slider-builder-for-woocommerce/inc/WooSlideProSingleProduct.php on line 11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-slider-pro-drag-drop-slider-builder-for-woocommerce/inc/SingleProduct.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-slider-pro-drag-drop-slider-builder-for-woocommerce/inc/actions.php:9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-slider-pro-drag-drop-slider-builder-for-woocommerce/inc/WooSlideProSingleProduct.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'BinaryCarpenter\\BC_SD\\Helpers' not found in wp-content/plugins/woo-slider-pro-drag-drop-slider-builder-for-woocommerce/ui/main-ui.php:4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-slider-pro-drag-drop-slider-builder-for-woocommerce/inc/SingleProduct.php on line 11
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/admin.php): failed to open stream: No such file or directory in wp-content/plugins/woo-slider-pro-drag-drop-slider-builder-for-woocommerce/inc/SingleProduct.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-slider-pro-drag-drop-slider-builder-for-woocommerce/inc/SingleProduct.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-slider-pro-drag-drop-slider-builder-for-woocommerce/inc/SingleProduct.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: product slider, woocommerce slider, woocommerce

woo-slider-pro-drag-drop-slider-builder-for-woocommerce/Initiator.php 92% from 13 tests

"Woo Slider Pro - Drag Drop Slider Builder For WooCommerce" version 1.12's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-slider-pro-drag-drop-slider-builder-for-woocommerce.php" instead of "Initiator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected10,651 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript49141,6224,542
SVG3302,703
CSS3831632,010
PHP134952271,396

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods65
▷ Static methods1421.54%
▷ Public methods5990.77%
▷ Protected methods00.00%
▷ Private methods69.23%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants21
▷ Global constants00.00%
▷ Class constants21100.00%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bundle/css/images/next_button.png16.98KB1.68KB▼ 90.09%
bundle/css/images/owl.video.play.png4.86KB2.74KB▼ 43.61%
bundle/images/presets/preset-placeholder.png17.10KB1.62KB▼ 90.52%
bundle/css/images/prev_button.png17.01KB1.70KB▼ 90.00%