83% age-checkbox-for-woocommerce

Code Review | Age Checkbox for-Woocommerce

WordPress plugin Age Checkbox for-Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: age-checkbox-for-...
  • Plugin version: 1.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6
  • WordPress version: 6.3.1
  • First release: Nov 14, 2019
  • Latest release: Nov 29, 2020
  • Number of updates: 10
  • Update frequency: every 38.1 days
  • Top authors: betacore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,270 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

An overview of server-side resources used by Age Checkbox for-Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.38 ▼0.34
Dashboard /wp-admin3.31 ▲0.0145.66 ▼3.66
Posts /wp-admin/edit.php3.36 ▲0.0149.18 ▼2.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.41 ▼9.42
Media Library /wp-admin/upload.php3.23 ▲0.0139.23 ▲3.09

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Age Checkbox for-Woocommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.131.76 ▲0.0743.83 ▲0.43
Dashboard /wp-admin2,203 ▲155.86 ▼0.04107.67 ▼3.1838.91 ▼4.63
Posts /wp-admin/edit.php2,092 ▼02.13 ▲0.1140.57 ▼3.5835.27 ▲0.65
Add New Post /wp-admin/post-new.php1,530 ▲1023.22 ▲2.19670.38 ▼44.3955.68 ▼5.95
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0094.92 ▼7.2142.98 ▼1.99

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/age-checkbox-for-woocommerce/woo-age-checkbox.php:16

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)
Everything seems fine on the user side


Plugin configuration 86% 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
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (The plugin in action!), #2 (The settings page.), #3 (Oops! Tick the box!)
The official readme.txt is a good inspiration

age-checkbox-for-woocommerce/woo-age-checkbox.php 77% from 13 tests

"Age Checkbox for-Woocommerce" version 1.1'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: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/lang" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("age-checkbox-for-woocommerce.php" instead of "woo-age-checkbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin89 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.43MB with 0.30MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png130.70KB39.99KB▼ 69.40%
screenshot-1.png120.23KB36.04KB▼ 70.02%
screenshot-2.png188.01KB51.76KB▼ 72.47%