83% woocommerce-checkout-age-varification

Code Review | Checkout Age Varification

WordPress plugin Checkout Age Varification scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-check...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Oct 18, 2015
  • Latest release: Apr 18, 2020
  • Number of updates: 4
  • Update frequency: every 437.0 days
  • Top authors: parthcreation (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /1,942 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Checkout Age Varification
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.95 ▼3.89
Dashboard /wp-admin3.31 ▲0.0045.33 ▲0.72
Posts /wp-admin/edit.php3.36 ▲0.0045.76 ▼5.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.39 ▼10.54
Media Library /wp-admin/upload.php3.23 ▲0.0031.69 ▼4.75

Server storage [IO: ▲0.55MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checkout Age Varification: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.551.64 ▼0.1140.06 ▼1.32
Dashboard /wp-admin2,209 ▲215.91 ▲0.06107.36 ▲8.4838.89 ▼1.84
Posts /wp-admin/edit.php2,089 ▲32.03 ▼0.0139.56 ▲1.2735.09 ▼3.00
Add New Post /wp-admin/post-new.php1,514 ▼517.78 ▼5.43681.02 ▲6.4559.01 ▲6.66
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.02112.03 ▲8.3651.55 ▲6.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woocommerce-checkout-age-varification/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Set age limit in backpanel), #2 (Datepicker At frontend), #3 (Validatation error if age limit is less than required age limit)
You can look at the official readme.txt

woocommerce-checkout-age-varification/index.php 92% from 13 tests

The primary PHP file in "Checkout Age Varification" version 1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-checkout-age-varification.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected478 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS13965385
PHP1952093

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.52MB with 0.36MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png189.53KB60.50KB▼ 68.08%
screenshot-3.png170.33KB51.61KB▼ 69.70%
screenshot-2.png171.53KB51.05KB▼ 70.24%