84% age-verify

Code Review | Age Verify

WordPress plugin Age Verify scored 84% from 54 tests.

About plugin

  • Plugin page: age-verify
  • Plugin version: 0.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.4.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2012
  • Latest release: Jan 17, 2016
  • Number of updates: 51
  • Update frequency: every 22.7 days
  • Top authors: ChaseWiseman (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

1,000+ active / 71,591 total downloads

Benchmarks

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
This plugin's installer ran successfully

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

An overview of server-side resources used by Age Verify
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.49 ▲0.38
Dashboard /wp-admin3.35 ▲0.0548.37 ▼4.57
Posts /wp-admin/edit.php3.40 ▲0.0449.84 ▲2.94
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.87 ▼11.05
Media Library /wp-admin/upload.php3.27 ▲0.0435.58 ▲1.89
Age Verify /wp-admin/options-general.php?page=age-verify3.2129.79

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Age Verify: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7414.48 ▲0.101.75 ▼0.0544.30 ▼0.28
Dashboard /wp-admin2,207 ▲195.77 ▲0.8899.15 ▼4.9340.41 ▼0.42
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0139.63 ▼1.9534.83 ▼1.08
Add New Post /wp-admin/post-new.php1,545 ▲918.50 ▼4.86600.85 ▼4.9459.63 ▲12.66
Media Library /wp-admin/upload.php1,392 ▲74.16 ▼0.0599.31 ▲5.1344.92 ▲1.32
Age Verify /wp-admin/options-general.php?page=age-verify1,2502.4056.0628.59

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=age-verify
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=age-verify
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: age, verify, restrict

age-verify/age-verify.php Passed 13 tests

Analyzing the main PHP file in "Age Verify" version 0.3.0
68 characters long description:
A simple way to ask visitors for their age before viewing your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin720 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6343558550
PO File14457107
CSS16157
JavaScript1406

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity15.50
▷ Minimum class complexity11.00
▷ Maximum class complexity20.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods23
▷ Static methods28.70%
▷ Public methods2191.30%
▷ Protected methods00.00%
▷ Private methods28.70%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected