83% gridlist-view-for-woocommerce

Code Review | Grid/List View for WooCommerce

WordPress plugin Grid/List View for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: gridlist-view-for...
  • Plugin version: 1.1.3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 25, 2015
  • Latest release: Sep 21, 2023
  • Number of updates: 74
  • Update frequency: every 39.2 days
  • Top authors: RazyRx (51.35%)dholovnia (50%)

Code review

54 tests

User reviews

46 reviews

Install metrics

4,000+ active /149,722 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.56MB] [CPU: ▲8.32ms] Passed 4 tests

A check of server-side resources used by Grid/List View for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.02 ▲1.5648.24 ▲7.36
Dashboard /wp-admin4.91 ▲1.6057.65 ▲9.45
Posts /wp-admin/edit.php4.96 ▲1.6061.53 ▲17.24
Add New Post /wp-admin/post-new.php7.43 ▲1.5495.43 ▲3.82
Media Library /wp-admin/upload.php4.77 ▲1.5451.15 ▲12.63

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 111 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
berocket_admin_notices_rate_stars
br-list_grid-options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Grid/List View for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲6514.42 ▼0.221.63 ▼0.3540.32 ▼4.91
Dashboard /wp-admin2,230 ▲395.88 ▲1.01107.38 ▼8.0868.92 ▲23.46
Posts /wp-admin/edit.php2,124 ▲322.05 ▲0.0041.88 ▲2.1837.66 ▲3.53
Add New Post /wp-admin/post-new.php1,550 ▲1720.96 ▼2.20745.40 ▲63.0257.74 ▲7.71
Media Library /wp-admin/upload.php1,424 ▲364.24 ▲0.0997.90 ▼17.9774.97 ▲25.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • berocket_key_activated_plugins
    • widget_theysaidso_widget
    • berocket_admin_notices_rate_stars
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 take a closer look at the following
  • 27× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gridlist-view-for-woocommerce/berocket/includes/error_notices.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/gridlist-view-for-woocommerce/divi/includes/GridListExtension.php:3
    • > PHP Notice
      Undefined variable: framework_version in wp-content/plugins/gridlist-view-for-woocommerce/berocket/framework_version.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/gridlist-view-for-woocommerce/divi/includes/modules/brgridlist/brgridlist.php:3
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/gridlist-view-for-woocommerce/berocket/templates/widget.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gridlist-view-for-woocommerce/berocket/libraries/tutorial.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gridlist-view-for-woocommerce/templates/settings/buttons_styles.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gridlist-view-for-woocommerce/berocket/libraries/tippy.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gridlist-view-for-woocommerce/berocket/includes/updater.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gridlist-view-for-woocommerce/main.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (30 tag instead of maximum 10)
Please take inspiration from this readme.txt

gridlist-view-for-woocommerce/woocommerce-list-grid-view.php 85% from 13 tests

Analyzing the main PHP file in "Grid/List View for WooCommerce" version 1.1.3.9
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gridlist-view-for-woocommerce.php" instead of "woocommerce-list-grid-view.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
There were no executable files found in this plugin23,591 lines of code in 80 files:
LanguageFilesBlank linesComment linesLines of code
PHP444791,51410,440
CSS162,514769,915
JavaScript141232452,267
PO File3390617854
JSX16178
XML20037

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity47.38
▷ Minimum class complexity1.00
▷ Maximum class complexity240.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes00.00%
Methods374
▷ Static methods13636.36%
▷ Public methods374100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions45
▷ Named functions45100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
divi/styles/ico.png1.90KB1.41KB▼ 25.89%
berocket/includes/ico.png1.90KB1.41KB▼ 25.89%
berocket/assets/css/mail.png2.59KB1.92KB▼ 26.02%
berocket/assets/images/submenu-icon.png0.62KB0.50KB▼ 20.13%
berocket/libraries/templates/default.png3.87KB2.63KB▼ 31.94%