93% woohide-hide-billing-fields

Code Review | WooCommerce Hide Billing Fields

WordPress plugin WooCommerce Hide Billing Fields scored 93% from 54 tests.

About plugin

  • Plugin page: woohide-hide-bill...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.2.2
  • WordPress version: 5.8.1
  • First release: Jun 7, 2016
  • Latest release: Apr 24, 2020
  • Number of updates: 27
  • Update frequency: every 52.5 days
  • Top authors: zamartz (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active / 5,340 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼137.17ms] Passed 4 tests

A check of server-side resources used by WooCommerce Hide Billing Fields
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.31 ▲12.35
Dashboard /wp-admin3.06 ▲0.0148.02 ▲4.77
Posts /wp-admin/edit.php3.12 ▲0.0146.09 ▲4.31
Add New Post /wp-admin/post-new.php5.42 ▼0.0188.73 ▼554.64
Media Library /wp-admin/upload.php3.01 ▲0.0031.90 ▼3.10

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WooCommerce Hide Billing Fields: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,683 ▲8715.83 ▲0.139.23 ▼0.5641.80 ▼3.74
Dashboard /wp-admin2,974 ▲435.91 ▼0.02135.74 ▼1.04101.77 ▼12.38
Posts /wp-admin/edit.php2,743 ▲42.72 ▼0.0062.55 ▲0.8690.89 ▼1.42
Add New Post /wp-admin/post-new.php1,503 ▼9118.48 ▼0.25356.35 ▼31.08108.72 ▲3.76
Media Library /wp-admin/upload.php1,811 ▲45.05 ▲0.01150.13 ▼2.33116.30 ▼6.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× 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/woohide-hide-billing-fields/zero-billing-fields-admin-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woohide-hide-billing-fields/zero-billing-fields-settings.php:62

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)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: zero amount, woocommerce, hide, zamartz, billing

woohide-hide-billing-fields/woocommerce-hide-billing-fields.php 69% from 13 tests

"WooCommerce Hide Billing Fields" version 1.0.4'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:
  • Domain Path: The domain path folder does not exist ("/code")
  • Description: Please don't use more than 140 characters for the plugin description (currently 277 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woohide-hide-billing-fields.php" instead of "woocommerce-hide-billing-fields.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin225 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31759225

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin