89% woo-free-gift

Code Review | Free Gift for WooCommerce

WordPress plugin Free Gift for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-free-gift
  • Plugin version: 0.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9
  • WordPress version: 6.3.1
  • First release: Feb 26, 2020
  • Latest release: Jan 27, 2022
  • Number of updates: 10
  • Update frequency: every 70.2 days
  • Top authors: makspostal (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,264 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: ▲0.01MB] [CPU: ▼6.17ms] Passed 4 tests

A check of server-side resources used by Free Gift for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.45 ▼2.11
Dashboard /wp-admin3.31 ▲0.0145.56 ▼1.16
Posts /wp-admin/edit.php3.37 ▲0.0145.60 ▲1.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.13 ▼18.69
Media Library /wp-admin/upload.php3.24 ▲0.0134.36 ▼2.71

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Free Gift for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.29 ▼0.071.60 ▲0.1136.47 ▼4.00
Dashboard /wp-admin2,203 ▲235.57 ▼0.0886.60 ▼1.0039.07 ▼2.37
Posts /wp-admin/edit.php2,111 ▲112.01 ▼0.0137.33 ▲1.0834.28 ▲0.35
Add New Post /wp-admin/post-new.php1,534 ▲823.08 ▲0.17677.29 ▼3.3750.37 ▼16.57
Media Library /wp-admin/upload.php1,405 ▲54.17 ▼0.01101.00 ▼4.0941.47 ▼4.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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: You are using too many tags: 15 tag instead of maximum 10
The official readme.txt is a good inspiration

woo-free-gift/woo-free-gift.php 92% from 13 tests

Analyzing the main PHP file in "Free Gift for WooCommerce" version 0.0.4
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin393 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7133142393

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods26
▷ Static methods26100.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin