83% age-gate-plus

Code Review | Age Gator

WordPress plugin Age Gator scored83%from 54 tests.

About plugin

  • Plugin page: age-gate-plus
  • Plugin version: 1.06
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Aug 30, 2019
  • Latest release: Jan 19, 2020
  • Number of updates: 23
  • Update frequency: every 12.0 days
  • Top authors: chrisgeelhoed (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /3,563 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▲0.74ms] Passed 4 tests

Analyzing server-side resources used by Age Gator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1845.09 ▲2.41
Dashboard /wp-admin3.52 ▲0.2156.08 ▲5.99
Posts /wp-admin/edit.php3.63 ▲0.2852.84 ▲1.17
Add New Post /wp-admin/post-new.php6.10 ▲0.2192.00 ▼6.61
Media Library /wp-admin/upload.php3.44 ▲0.2144.97 ▲6.32

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 62 new files
Database: no new tables, 50 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Age Gator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,704 ▲93314.56 ▲0.0043.82 ▲41.0053.74 ▲4.30
Dashboard /wp-admin2,206 ▲185.83 ▲0.94102.86 ▼10.1255.03 ▲7.10
Posts /wp-admin/edit.php2,086 ▼62.02 ▼0.0335.48 ▼2.1633.39 ▼4.60
Add New Post /wp-admin/post-new.php1,533 ▲1923.15 ▲5.64677.10 ▲41.3552.49 ▼17.41
Media Library /wp-admin/upload.php1,552 ▲1614.56 ▲0.35101.87 ▲1.9139.49 ▼5.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/age-gate-plus/views/feedback_modal.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
You can take inspiration from this readme.txt

age-gate-plus/age-gator.php 85% from 13 tests

The primary PHP file in "Age Gator" version 1.06 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 281 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("age-gate-plus.php" instead of "age-gator.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
Success! There were no dangerous files found in this plugin13,109 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
Vuejs Component7530675

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.23
Average class complexity21.00
▷ Minimum class complexity8.00
▷ Maximum class complexity34.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods2488.89%
▷ Public methods2696.30%
▷ Protected methods00.00%
▷ Private methods13.70%
▷ Named functions00.00%
▷ Anonymous functions7100.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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 are no PNG files in this plugin