77% grid-slider-carousel-for-woocommerce

Code Review | Grid, Slider & Carousel for Woocommerce

WordPress plugin Grid, Slider & Carousel for Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: grid-slider-carou...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 11, 2016
  • Latest release: May 11, 2016
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: repupress (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /4,267 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.87ms] Passed 4 tests

Analyzing server-side resources used by Grid, Slider & Carousel for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.69 ▼2.77
Dashboard /wp-admin3.32 ▲0.0147.98 ▼4.24
Posts /wp-admin/edit.php3.37 ▲0.0052.30 ▲4.97
Add New Post /wp-admin/post-new.php5.90 ▲0.0199.55 ▼12.64
Media Library /wp-admin/upload.php3.24 ▲0.0042.82 ▲4.17

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 244 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Grid, Slider & Carousel for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.30 ▼0.071.81 ▼0.0244.41 ▲5.86
Dashboard /wp-admin2,207 ▲305.73 ▲0.1186.06 ▼6.8245.19 ▼1.20
Posts /wp-admin/edit.php2,110 ▲101.97 ▼0.0539.53 ▲3.6544.78 ▲12.49
Add New Post /wp-admin/post-new.php1,549 ▲2323.47 ▲5.90614.81 ▼55.9560.80 ▲1.02
Media Library /wp-admin/upload.php1,409 ▲124.23 ▲0.05175.90 ▲64.8969.79 ▲20.11

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/grid-slider-carousel-for-woocommerce/template/slider.php
  • 211× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: cart_txt_trans_ho in wp-content/plugins/grid-slider-carousel-for-woocommerce/template/main/hover.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function is_featured() on null in wp-content/plugins/grid-slider-carousel-for-woocommerce/template/main/overlay.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'VP_View' not found in wp-content/plugins/grid-slider-carousel-for-woocommerce/inc/views/control/fontawesome.php:1
    • > PHP Notice
      Undefined variable: fo_size in wp-content/plugins/grid-slider-carousel-for-woocommerce/template/main/overlay.php on line 1
    • > PHP Notice
      Undefined variable: cart_bor_wid_over in wp-content/plugins/grid-slider-carousel-for-woocommerce/template/main/overlay.php on line 1
    • > PHP Notice
      Undefined variable: h3_col in wp-content/plugins/grid-slider-carousel-for-woocommerce/template/main/hover.php on line 1
    • > PHP Notice
      Undefined variable: cart_bg_hover in wp-content/plugins/grid-slider-carousel-for-woocommerce/template/main/hover.php on line 1
    • > PHP Notice
      Undefined variable: cart_fo_size_ho in wp-content/plugins/grid-slider-carousel-for-woocommerce/template/main/hover.php on line 1
    • > PHP Notice
      Undefined variable: out_bg in wp-content/plugins/grid-slider-carousel-for-woocommerce/template/main/normal.php on line 1
    • > PHP Notice
      Undefined variable: set in wp-content/plugins/grid-slider-carousel-for-woocommerce/inc/views/option/set.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: The official readme.txt is a good inspiration

grid-slider-carousel-for-woocommerce/gsc-for-woocommerce.php 92% from 13 tests

"Grid, Slider & Carousel for Woocommerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("grid-slider-carousel-for-woocommerce.php" instead of "gsc-for-woocommerce.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected22,094 lines of code in 185 files:
LanguageFilesBlank linesComment linesLines of code
PHP1162,6732,64014,360
CSS151541763,310
JavaScript494473082,973
SVG200979
PO File12081,347444
Markdown112027
JSON1001

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity21.10
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes59
▷ Abstract classes46.78%
▷ Concrete classes5593.22%
▷ Final classes00.00%
Methods540
▷ Static methods8916.48%
▷ Public methods50793.89%
▷ Protected methods193.52%
▷ Private methods142.59%
Functions58
▷ Named functions58100.00%
▷ Anonymous functions00.00%
Constants38
▷ Global constants3592.11%
▷ Class constants37.89%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
35 PNG files occupy 0.69MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png35.09KB20.49KB▼ 41.62%
inc/public/img/vp_shortcode_icon_sprite.png1.55KB0.42KB▼ 73.10%
inc/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
assets/grid-options-pf.png25.98KB10.47KB▼ 59.70%
inc/public/img/select2/select2x2.png0.83KB0.77KB▼ 6.15%