94% c4d-woo-grid-product

Code Review | C4D Woo Grid Product

WordPress plugin C4D Woo Grid Product scored 94% from 54 tests.

About plugin

  • Plugin page: c4d-woo-grid-product
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.8.1
  • First release: Feb 17, 2017
  • Latest release: Mar 14, 2017
  • Number of updates: 8
  • Update frequency: every 3.1 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 649 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼143.83ms] Passed 4 tests

Analyzing server-side resources used by C4D Woo Grid Product
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1434.82 ▲9.14
Dashboard /wp-admin3.08 ▲0.0351.86 ▲4.68
Posts /wp-admin/edit.php3.13 ▲0.0243.99 ▼4.22
Add New Post /wp-admin/post-new.php5.44 ▲0.0090.57 ▼565.34
Media Library /wp-admin/upload.php3.02 ▲0.0226.59 ▼10.44

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

C4D Woo Grid Product: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,792 ▲19616.28 ▲0.2611.96 ▲2.1249.61 ▼1.66
Dashboard /wp-admin2,967 ▲365.92 ▼0.29139.36 ▼11.62131.96 ▲12.46
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0075.02 ▲1.70102.20 ▲11.86
Add New Post /wp-admin/post-new.php1,672 ▼1118.87 ▲0.21390.92 ▲0.54111.01 ▼6.03
Media Library /wp-admin/upload.php1,804 ▼35.04 ▲0.01169.68 ▲4.27117.70 ▼13.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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)
Good news, no errors were detected

SRP 50% 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 take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/c4d-woo-grid-product/templates/default.php:13
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/c4d-woo-grid-product/templates/default.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/c4d-woo-grid-product/c4d-woo-grid-product.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/c4d-woo-grid-product/templates/__item.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

c4d-woo-grid-product/c4d-woo-grid-product.php 92% from 13 tests

Analyzing the main PHP file in "C4D Woo Grid Product" version 2.0.0
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 detected504 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
Sass130205
PHP3209197
JavaScript311101
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin