78% remove-default-checkout-fields-for-woocommerce

Code Review | Remove Checkout Fields for Woocommerce

WordPress plugin Remove Checkout Fields for Woocommerce scored 78% from 54 tests.

About plugin

  • Plugin page: remove-default-ch...
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: May 24, 2022
  • Latest release: Nov 17, 2022
  • Number of updates: 12
  • Update frequency: every 14.8 days
  • Top authors: imawais (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 1,572 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▲0.67ms] Passed 4 tests

A check of server-side resources used by Remove Checkout Fields for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.79 ▲2.39
Dashboard /wp-admin3.36 ▲0.0646.75 ▼2.98
Posts /wp-admin/edit.php3.41 ▲0.0548.63 ▲1.43
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.02 ▲2.29
Media Library /wp-admin/upload.php3.28 ▲0.0537.05 ▲1.94

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Remove Checkout Fields for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.80 ▲0.511.95 ▲0.2039.44 ▼3.62
Dashboard /wp-admin2,209 ▲264.83 ▼1.06102.88 ▼10.8038.87 ▲1.56
Posts /wp-admin/edit.php2,094 ▲52.05 ▼0.0136.88 ▼0.2635.71 ▲3.89
Add New Post /wp-admin/post-new.php1,545 ▲323.17 ▲4.96616.60 ▼7.9455.91 ▼37.83
Media Library /wp-admin/upload.php1,394 ▲94.25 ▼0.02101.56 ▼1.5441.49 ▼3.76

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/remove-default-checkout-fields-for-woocommerce/Remove-Checkout-Fields-woo.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/remove-default-checkout-fields-for-woocommerce/remove-fields.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: woocommerce, hide checkout fields, remove checkout fields, remove shipping fields, remove billing fields...

remove-default-checkout-fields-for-woocommerce/Remove-Checkout-Fields-woo.php 85% from 13 tests

"Remove Checkout Fields for Woocommerce" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("remove-default-checkout-fields-for-woocommerce.php" instead of "Remove-Checkout-Fields-woo.php")

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 detected305 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP312421305

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin