83% wct-woocommerce-responsive-grid

Code Review | WooCommerce Product Grids

WordPress plugin WooCommerce Product Grids scored83%from 54 tests.

About plugin

  • Plugin page: wct-woocommerce-r...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.1-5.8
  • WordPress version: 6.3.1
  • First release: Jun 14, 2016
  • Latest release: Jul 22, 2021
  • Number of updates: 25
  • Update frequency: every 74.5 days
  • Top authors: suhailahmad64 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /4,269 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.18ms] Passed 4 tests

A check of server-side resources used by WooCommerce Product Grids
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0432.66 ▼8.74
Dashboard /wp-admin3.36 ▲0.0143.43 ▼11.88
Posts /wp-admin/edit.php3.41 ▲0.0542.45 ▼6.83
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.08 ▼13.28
Media Library /wp-admin/upload.php3.28 ▲0.0534.81 ▲0.50

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Product Grids
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.35 ▼0.951.73 ▼0.1039.09 ▼1.82
Dashboard /wp-admin2,231 ▲434.85 ▼0.1097.22 ▼3.7639.44 ▼1.86
Posts /wp-admin/edit.php2,111 ▲222.06 ▲0.0734.63 ▼6.2133.29 ▼3.04
Add New Post /wp-admin/post-new.php1,542 ▲918.39 ▼4.77639.62 ▼38.2158.76 ▼1.84
Media Library /wp-admin/upload.php1,413 ▲224.42 ▲0.2196.54 ▼6.0043.21 ▼0.88

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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wct-woocommerce-responsive-grid/index.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wct-woocommerce-responsive-grid === )
The official readme.txt is a good inspiration

wct-woocommerce-responsive-grid/index.php 92% from 13 tests

This is the main PHP file of "WooCommerce Product Grids" version 2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wct-woocommerce-responsive-grid.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected24,565 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS763634418,055
SVG3034,945
JavaScript23271701,357
PHP19135184
HTML218024

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.59MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
premium.png36.67KB13.28KB▼ 63.78%
screenshot-1.png417.85KB116.61KB▼ 72.09%
icon-128x128.png24.04KB7.90KB▼ 67.15%
(invalid) assets/css/owl.video.play.png0.24KB0.00KB▼ 100.00%
wct_grid_assets/star-rating.png66.29KB11.30KB▼ 82.96%