84% woo-custom-registration

Code Review | Woocommerce Custom Registration

WordPress plugin Woocommerce Custom Registration scored84%from 54 tests.

About plugin

  • Plugin page: woo-custom-regist...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0.3
  • WordPress version: 6.3.1
  • First release: Feb 16, 2019
  • Latest release: Feb 16, 2019
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: mugaict (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,325 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.85ms] Passed 4 tests

This is a short check of server-side resources used by Woocommerce Custom Registration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.83 ▼5.50
Dashboard /wp-admin3.33 ▼0.0249.19 ▼20.48
Posts /wp-admin/edit.php3.38 ▲0.0249.18 ▼4.98
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.01 ▼12.42
Media Library /wp-admin/upload.php3.25 ▲0.0241.40 ▲2.66

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce Custom Registration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲3913.66 ▼0.711.62 ▼0.6540.58 ▼1.26
Dashboard /wp-admin2,210 ▲255.79 ▼0.09107.89 ▼5.1540.24 ▼3.85
Posts /wp-admin/edit.php2,102 ▲132.01 ▼0.0140.20 ▼0.5938.92 ▲2.02
Add New Post /wp-admin/post-new.php1,524 ▲517.54 ▼5.84686.08 ▲37.3464.34 ▲15.69
Media Library /wp-admin/upload.php1,395 ▲44.38 ▲0.1097.80 ▼4.1144.31 ▼1.07

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Interface 'Woocommerce_Custom_Registration_iForm_Element' not found in wp-content/plugins/woo-custom-registration/includes/form-elements/class-woo-custom-form-element-select.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Woocommerce_Custom_Registration_iForm_Element' not found in wp-content/plugins/woo-custom-registration/includes/form-elements/class-woo-custom-form-element-text.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Woocommerce_Custom_Registration_iForm_Element' not found in wp-content/plugins/woo-custom-registration/includes/form-elements/class-woo-custom-form-element-checkbox.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Woocommerce_Custom_Registration_iForm_Element' not found in wp-content/plugins/woo-custom-registration/includes/form-elements/class-woo-custom-form-element-number.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Woocommerce_Custom_Registration_iForm_Element' not found in wp-content/plugins/woo-custom-registration/includes/form-elements/class-woo-custom-form-element-radio.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Woocommerce_Custom_Registration_iForm_Element' not found in wp-content/plugins/woo-custom-registration/includes/form-elements/class-woo-custom-form-element-textarea.php:9

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 Passed 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
4 plugin tags: woocommerce custom registration, woocommerce account, woocommerce regsitration, woocommerce

woo-custom-registration/woo-custom-registration.php Passed 13 tests

The main PHP script in "Woocommerce Custom Registration" version 1.0.0 is automatically included on every request by WordPress
98 characters long description:
This plugin allows you to customize the WooCommerce registration form and collect extra user data.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,680 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP214084331,556
JavaScript29050
Markdown116038
CSS25023
SVG10013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity11.78
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods115
▷ Static methods7666.09%
▷ Public methods10692.17%
▷ Protected methods00.00%
▷ Private methods97.83%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected