90% free-product-for-woocommerce

Code Review | Free Product for WooCommerce

WordPress plugin Free Product for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: free-product-for-...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 25, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 20
  • Update frequency: every 34.2 days
  • Top authors: nitin247 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /854 total downloads

Benchmarks

Plugin footprint 83% from 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: ▼5.09ms] 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 /3.47 ▲0.0140.91 ▲4.67
Dashboard /wp-admin3.32 ▼0.0350.01 ▼6.29
Posts /wp-admin/edit.php3.37 ▲0.0147.29 ▼1.15
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.12 ▼16.35
Media Library /wp-admin/upload.php3.24 ▲0.0135.27 ▲3.44

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, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

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 /2,814 ▲5314.28 ▼0.041.76 ▲0.1239.14 ▼1.19
Dashboard /wp-admin2,195 ▲215.58 ▼0.0482.87 ▼3.0337.73 ▼1.90
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0440.49 ▲3.8234.54 ▼0.42
Add New Post /wp-admin/post-new.php1,526 ▼923.01 ▲4.66655.21 ▲45.6465.15 ▲2.17
Media Library /wp-admin/upload.php1,397 ▼34.16 ▼0.0397.05 ▼0.7344.76 ▲1.61

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

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 Passed 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
9 plugin tags: pricing, sample product, woocommerce, single product, products...

free-product-for-woocommerce/free-product-for-woocommerce.php Passed 13 tests

The main PHP script in "Free Product for WooCommerce" version 1.1 is automatically included on every request by WordPress
39 characters long description:
Display FREE if Price is Zero or Empty.

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