89% f4-woocommerce-salutation-fields

Code Review | F4 Salutation Fields for WooCommerce

WordPress plugin F4 Salutation Fields for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: f4-woocommerce-sa...
  • Plugin version: 1.0.18
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 5, 2018
  • Latest release: Oct 6, 2023
  • Number of updates: 25
  • Update frequency: every 70.6 days
  • Top authors: faktorvier (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /4,424 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.13ms] Passed 4 tests

Server-side resources used by F4 Salutation Fields for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.29 ▼3.90
Dashboard /wp-admin3.33 ▼0.0148.18 ▼7.36
Posts /wp-admin/edit.php3.39 ▲0.0345.40 ▲0.32
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.14 ▼21.56
Media Library /wp-admin/upload.php3.26 ▲0.0338.62 ▲4.14

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for F4 Salutation Fields for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.40 ▲0.041.72 ▲0.0547.02 ▲2.07
Dashboard /wp-admin2,195 ▲215.61 ▲0.0394.19 ▲10.2941.97 ▲1.06
Posts /wp-admin/edit.php2,097 ▼32.00 ▼0.0333.27 ▼4.0536.47 ▲3.62
Add New Post /wp-admin/post-new.php1,535 ▲718.26 ▼4.89647.31 ▼40.4668.45 ▲14.67
Media Library /wp-admin/upload.php1,403 ▲94.22 ▲0.0295.33 ▼10.6242.78 ▼6.38

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

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

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate 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 take inspiration from this readme.txt

f4-woocommerce-salutation-fields/f4-woocommerce-salutation-fields.php 92% from 13 tests

"F4 Salutation Fields for WooCommerce" version 1.0.18's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin388 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP393243388

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity28.50
▷ Minimum class complexity11.00
▷ Maximum class complexity46.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods25100.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants8100.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