90% age-restriction-18-for-checkout-fields

Code Review | Age Restriction 18+ for Checkout Fields

WordPress plugin Age Restriction 18+ for Checkout Fields scored90%from 54 tests.

About plugin

  • Plugin page: age-restriction-1...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Sep 19, 2019
  • Latest release: Sep 19, 2019
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: Heitor_tito (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /875 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.16ms] Passed 4 tests

This is a short check of server-side resources used by Age Restriction 18+ for Checkout Fields
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.0340.33 ▼4.57
Dashboard /wp-admin3.67 ▲0.1051.40 ▼7.45
Posts /wp-admin/edit.php3.72 ▲0.0453.54 ▼2.23
Add New Post /wp-admin/post-new.php6.19 ▲0.04100.10 ▼10.40
Media Library /wp-admin/upload.php3.53 ▲0.0439.63 ▼1.40
Age +18 Restriction /wp-admin/admin.php?page=age-restriction-18-for-checkout-fields3.4933.77

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Age Restriction 18+ for Checkout Fields
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.71 ▲0.341.75 ▼0.2137.11 ▼13.03
Dashboard /wp-admin2,198 ▲245.66 ▲0.0895.45 ▼5.3943.49 ▼0.11
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0341.00 ▲1.3436.53 ▲1.63
Add New Post /wp-admin/post-new.php1,546 ▲2023.10 ▲5.38677.72 ▲44.7852.58 ▼7.50
Media Library /wp-admin/upload.php1,394 ▼34.22 ▼0.03103.63 ▲0.2143.64 ▼5.64
Age +18 Restriction /wp-admin/admin.php?page=age-restriction-18-for-checkout-fields8492.1724.2533.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: woocommerce extra checkout fields for brazil, woocomerce, age restrict woocommerce

age-restriction-18-for-checkout-fields/age-restriction-18-for-checkout-fields.php 92% from 13 tests

"Age Restriction 18+ for Checkout Fields" version 1.0.0'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:
  • Description: Please keep the plugin description shorter than 140 characters (currently 275 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected197 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP441124197

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity7.33
▷ Minimum class complexity5.00
▷ Maximum class complexity10.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods316.67%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin