90% email-fields-for-woocommerce

Code Review | Email Fields For WooCommerce

WordPress plugin Email Fields For WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: email-fields-for-...
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 21, 2021
  • Latest release: Nov 17, 2023
  • Number of updates: 19
  • Update frequency: every 52.8 days
  • Top authors: ingerikagili (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /587 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.97ms] Passed 4 tests

A check of server-side resources used by Email Fields For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0835.66 ▼6.49
Dashboard /wp-admin3.38 ▲0.0847.03 ▲0.67
Posts /wp-admin/edit.php3.50 ▲0.1447.51 ▲1.81
Add New Post /wp-admin/post-new.php5.96 ▲0.0891.18 ▲0.15
Media Library /wp-admin/upload.php3.31 ▲0.0834.29 ▲1.98

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Email Fields For WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.67 ▲0.391.79 ▲0.0939.19 ▼5.12
Dashboard /wp-admin2,195 ▲175.60 ▼0.0391.33 ▼18.1039.17 ▼8.14
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0038.75 ▼3.6236.09 ▼7.01
Add New Post /wp-admin/post-new.php1,526 ▼823.32 ▼1.78595.60 ▼30.4247.29 ▼15.57
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.0899.53 ▲4.2645.56 ▲5.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: bcc, more email fields, reply to, email field, reply to woocommerce...

email-fields-for-woocommerce/index.php 92% from 13 tests

The main file in "Email Fields For WooCommerce" v. 1.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("email-fields-for-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected760 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP13163387755
JSON1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity20.40
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods46
▷ Static methods1941.30%
▷ Public methods4393.48%
▷ Protected methods00.00%
▷ Private methods36.52%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected