89% fewc-extra-checkout-fields-for-woocommerce

Code Review | FEWC - Extra Checkout Fields For WooCommerce

WordPress plugin FEWC - Extra Checkout Fields For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: fewc-extra-checko...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 16, 2022
  • Latest release: Apr 12, 2023
  • Number of updates: 13
  • Update frequency: every 11.7 days
  • Top authors: mytrinh (84.62%)villatheme (23.08%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /402 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by FEWC - Extra Checkout Fields For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.34 ▼8.08
Dashboard /wp-admin3.33 ▲0.0344.78 ▼3.42
Posts /wp-admin/edit.php3.38 ▲0.0344.72 ▼2.65
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.96 ▼14.38
Media Library /wp-admin/upload.php3.26 ▲0.0336.88 ▲1.31

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

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

Browser metrics Passed 4 tests

Checking browser requirements for FEWC - Extra Checkout Fields For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.19 ▼1.241.66 ▼0.0941.63 ▼5.74
Dashboard /wp-admin2,211 ▲204.84 ▼0.9797.61 ▼10.8839.32 ▼3.56
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0235.02 ▼2.3834.23 ▲0.44
Add New Post /wp-admin/post-new.php1,534 ▼318.30 ▼4.80632.05 ▼23.0652.85 ▼4.04
Media Library /wp-admin/upload.php1,390 ▼14.22 ▼0.0195.46 ▼5.7442.80 ▼0.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Display discount price on the products page), #2 (Display discount price on the products list), #3 (Cart discount)
You can look at the official readme.txt

fewc-extra-checkout-fields-for-woocommerce/fewc-extra-checkout-fields-for-woocommerce.php 92% from 13 tests

The main PHP file in "FEWC - Extra Checkout Fields For WooCommerce" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 231 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
No dangerous file extensions were detected9,854 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
SVG30123,792
PHP131721412,875
JavaScript182541,528
CSS2162104921
Sass4470738

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity49.30
▷ Minimum class complexity2.00
▷ Maximum class complexity237.00
Average method complexity6.37
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods90
▷ Static methods2831.11%
▷ Public methods8190.00%
▷ Protected methods77.78%
▷ Private methods22.22%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/minicolors.png67.02KB34.31KB▼ 48.80%