62% xox-woocommerce-slidercarousel

Code Review | X-tra Ordinary WooCommerce Product Carousel and Slider

WordPress plugin X-tra Ordinary WooCommerce Product Carousel and Slider scored 62% from 54 tests.

About plugin

  • Plugin page: xox-woocommerce-s...
  • Plugin version: 3.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Jun 12, 2015
  • Latest release: Jun 14, 2017
  • Number of updates: 43
  • Update frequency: every 17.1 days
  • Top authors: dedong (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active / 7,949 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.05MB] [CPU: ▼40.01ms] Passed 4 tests

Analyzing server-side resources used by X-tra Ordinary WooCommerce Product Carousel and Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▼0.5516.50 ▼25.17
Dashboard /wp-admin2.96 ▼0.3418.51 ▼28.29
Posts /wp-admin/edit.php2.96 ▼0.3917.46 ▼28.59
Add New Post /wp-admin/post-new.php2.96 ▼2.9216.56 ▼77.98
Media Library /wp-admin/upload.php2.96 ▼0.2717.79 ▼16.21
Add New Slider/Carousel /wp-admin/post-new.php?post_type=xox-carousel-slider2.9617.98
Edit Theme /wp-admin/edit.php?post_type=xox-carousel-slider&page=xox-carousel-slider-edit-theme2.9717.39
XoX Slider & Carousel /wp-admin/edit.php?post_type=xox-carousel-slider2.9716.95
Upload/Import Theme /wp-admin/edit.php?post_type=xox-carousel-slider&page=xox-carousel-slider-upload-theme2.9717.60

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 483 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
recovery_mode_email_last_sent
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_wpb_widget

Browser metrics Passed 4 tests

X-tra Ordinary WooCommerce Product Carousel and Slider: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12413.30 ▼1.451.71 ▼0.3840.93 ▼2.34
Dashboard /wp-admin2,262 ▲715.89 ▲1.0394.02 ▼8.6340.37 ▼2.31
Posts /wp-admin/edit.php2,146 ▲572.05 ▲0.0035.78 ▲2.6232.32 ▼2.31
Add New Post /wp-admin/post-new.php1,560 ▲2423.31 ▲0.14635.55 ▲1.5466.65 ▲10.15
Media Library /wp-admin/upload.php1,448 ▲634.28 ▲0.0996.99 ▼4.1243.03 ▼3.05
Add New Slider/Carousel /wp-admin/post-new.php?post_type=xox-carousel-slider1,6271.8925.4847.54
Edit Theme /wp-admin/edit.php?post_type=xox-carousel-slider&page=xox-carousel-slider-edit-theme9872.1530.2435.08
XoX Slider & Carousel /wp-admin/edit.php?post_type=xox-carousel-slider1,1202.0935.6727.64
Upload/Import Theme /wp-admin/edit.php?post_type=xox-carousel-slider&page=xox-carousel-slider-upload-theme9402.1126.4728.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/xox-woocommerce-slidercarousel/includes/class-xox-woo-carousel-custom-meta-box.php+46
    Trying to get property 'slug' of non-object
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_wpb_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=xox-carousel-slider&page=xox-carousel-slider-upload-theme
    • > Notice in wp-content/plugins/xox-woocommerce-slidercarousel/includes/class-xox-woo-carousel-custom-meta-box.php+46
    Trying to get property 'slug' of non-object
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=xox-carousel-slider&page=xox-carousel-slider-upload-theme
    • > Notice in wp-content/plugins/xox-woocommerce-slidercarousel/includes/class-xox-woo-carousel-custom-meta-box.php+46
    Trying to get property 'name' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=xox-carousel-slider
    • > Compile error in wp-content/plugins/xox-woocommerce-slidercarousel/includes/cmb2/includes/types/CMB2_Type_Colorpicker.php+35
    Declaration of CMB2_Type_Colorpicker::render() must be compatible with CMB2_Type_Text::render($args = Array)

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 fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/xox-woocommerce-slidercarousel/admin/partials/xox-woo-carousel-admin-display.php
    • > /wp-content/plugins/xox-woocommerce-slidercarousel/public/partials/xox-woo-carousel-public-display.php
  • 102× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/xox-woocommerce-slidercarousel/includes/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/xox-woocommerce-slidercarousel/includes/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Notice
      Undefined variable: sliderID in wp-content/plugins/xox-woocommerce-slidercarousel/includes/templates/slider/default.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/xox-woocommerce-slidercarousel/includes/cmb2/includes/CMB2_hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xox-woocommerce-slidercarousel/includes/cmb2/init.php:120
    • > PHP Notice
      Undefined variable: default_next in wp-content/plugins/xox-woocommerce-slidercarousel/includes/templates/slider/default.php on line 14
    • > PHP Notice
      Undefined variable: loops in wp-content/plugins/xox-woocommerce-slidercarousel/includes/templates/carousel/vertical.php on line 2
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/xox-woocommerce-slidercarousel/includes/templates/carousel/default.php on line 2
    • > PHP Notice
      Undefined variable: sliderID in wp-content/plugins/xox-woocommerce-slidercarousel/includes/templates/slider/overlay.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/xox-woocommerce-slidercarousel/includes/cmb2/includes/types/CMB2_Type_Text_Date.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: category, sliders, products, woocommerce, premium...

xox-woocommerce-slidercarousel/xox-woo-carousel.php 85% from 13 tests

The entry point to "X-tra Ordinary WooCommerce Product Carousel and Slider" version 3.1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("xox-woocommerce-slidercarousel.php" instead of "xox-woo-carousel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected101,803 lines of code in 315 files:
LanguageFilesBlank linesComment linesLines of code
XML10047,726
PO File12414,15818,38132,404
PHP772,2125,9027,459
CSS231,1681,1657,012
Sass27288492,518
JavaScript265454932,438
LESS1323331,247
SVG100520
YAML290156
Markdown2550135
JSON30095
HTML160193

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity16.91
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes74
▷ Abstract classes810.81%
▷ Concrete classes6689.19%
▷ Final classes00.00%
Methods510
▷ Static methods8115.88%
▷ Public methods42382.94%
▷ Protected methods7514.71%
▷ Private methods122.35%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants743.75%
▷ Class constants956.25%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
15 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/js/logo.png5.74KB1.98KB▼ 65.48%
includes/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
includes/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
includes/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
includes/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%