89% f4-woocommerce-shipping-phone-and-e-mail

Code Review | F4 Shipping Phone and E-Mail for WooCommerce

WordPress plugin F4 Shipping Phone and E-Mail for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: f4-woocommerce-sh...
  • Plugin version: 1.0.18
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 8.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 30, 2018
  • Latest release: Oct 18, 2023
  • Number of updates: 28
  • Update frequency: every 63.7 days
  • Top authors: faktorvier (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /11,372 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.35ms] Passed 4 tests

Analyzing server-side resources used by F4 Shipping Phone and E-Mail for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.74 ▼4.39
Dashboard /wp-admin3.34 ▲0.0347.49 ▼0.78
Posts /wp-admin/edit.php3.39 ▲0.0348.57 ▼0.88
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.69 ▼3.36
Media Library /wp-admin/upload.php3.26 ▲0.0334.52 ▲1.31

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for F4 Shipping Phone and E-Mail for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.001.70 ▼0.0939.17 ▼6.81
Dashboard /wp-admin2,195 ▲155.67 ▲0.0583.57 ▼14.7239.17 ▼2.92
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0442.12 ▲5.3835.78 ▲3.30
Add New Post /wp-admin/post-new.php1,526 ▼223.08 ▲0.12676.33 ▼18.4064.86 ▲11.79
Media Library /wp-admin/upload.php1,397 ▼34.34 ▲0.12100.29 ▲7.1248.12 ▲0.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

f4-woocommerce-shipping-phone-and-e-mail/f4-woocommerce-shipping-phone-and-e-mail.php 92% from 13 tests

The main PHP file in "F4 Shipping Phone and E-Mail for WooCommerce" ver. 1.0.18 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "8.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin499 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3129264499

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity44.50
▷ Minimum class complexity3.00
▷ Maximum class complexity86.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods28100.00%
▷ Public methods28100.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
There are no PNG files in this plugin