100% free-product-for-woocommerce

Code Review | Free Product for WooCommerce

WordPress plugin Free Product for WooCommerce scored 100% from 54 tests.

About plugin

  • Plugin page: free-product-for-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.8
  • WordPress version: 5.8.1
  • First release: Sep 25, 2021
  • Latest release: Sep 27, 2021
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: nitin247 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 66 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

An overview of server-side resources used by Free Product for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1241.38 ▲16.25
Dashboard /wp-admin3.06 ▲0.0150.72 ▼0.62
Posts /wp-admin/edit.php3.11 ▲0.0149.82 ▼13.74
Add New Post /wp-admin/post-new.php5.42 ▼0.0198.20 ▼567.87
Media Library /wp-admin/upload.php3.00 ▲0.0029.34 ▼11.05

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Free Product for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.10 ▲0.4911.74 ▲0.2449.99 ▲1.32
Dashboard /wp-admin2,970 ▲395.92 ▼0.04153.30 ▼34.78115.32 ▼32.15
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0266.32 ▼11.43100.13 ▼3.86
Add New Post /wp-admin/post-new.php1,683 ▼018.70 ▲0.24383.44 ▼49.77122.43 ▲7.32
Media Library /wp-admin/upload.php1,807 ▼05.05 ▲0.03156.36 ▼6.93125.64 ▼15.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: woocommerce product, free product, zero price, sample product, woocommerce...

free-product-for-woocommerce/free-product-for-woocommerce.php 92% from 13 tests

The main PHP script in "Free Product for WooCommerce" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "4.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected32 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP292832

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin