79% easy-age-verify

Code Review | Easy Age Verify

WordPress plugin Easy Age Verify scored79%from 54 tests.

About plugin

  • Plugin page: easy-age-verify
  • Plugin version: 1.8.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Oct 10, 2019
  • Latest release: Jul 6, 2023
  • Number of updates: 53
  • Update frequency: every 25.8 days
  • Top authors: 5starplugins (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /13,175 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.04MB] [CPU: ▲20.14ms] 75% from 4 tests

A check of server-side resources used by Easy Age Verify
The following require your attention
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.04MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.89 ▲5.4366.17 ▲26.39
Dashboard /wp-admin8.91 ▲5.6071.68 ▲20.06
Posts /wp-admin/edit.php8.91 ▲5.5577.89 ▲30.52
Add New Post /wp-admin/post-new.php9.47 ▲3.58104.45 ▲3.58
Media Library /wp-admin/upload.php8.91 ▲5.6870.26 ▲37.32
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9159.09

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 199 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
widget_recent-comments
_evav_user_age_verify_option
widget_theysaidso_widget
fs_active_plugins
theysaidso_admin_options
db_upgraded
fs_accounts
_evav_always_verify
widget_recent-posts
...

Browser metrics Passed 4 tests

Easy Age Verify: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲18114.07 ▼0.245.14 ▲3.3229.34 ▼14.71
Dashboard /wp-admin2,240 ▲495.90 ▲0.00110.08 ▲12.3844.49 ▲4.05
Posts /wp-admin/edit.php2,123 ▲341.99 ▼0.0039.35 ▼6.3537.79 ▲1.63
Add New Post /wp-admin/post-new.php1,532 ▲1823.04 ▲5.62659.19 ▲27.7648.96 ▼5.82
Media Library /wp-admin/upload.php1,419 ▲344.23 ▲0.0594.09 ▼11.7344.03 ▼0.01
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0941.6824.1029.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/easy-age-verify/includes/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 11 options in the database
    • widget_theysaidso_widget
    • _evav_user_age_verify_option
    • _evav_always_verify
    • fs_accounts
    • widget_recent-posts
    • fs_active_plugins
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • fs_debug_mode
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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 on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

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

The primary PHP file in "Easy Age Verify" version 1.8.2 is used by WordPress to initiate all plugin functionality
111 characters long description:
Adds a mobile friendly age verification screen to adults only, vape or alcohol websites. Get set-up in minutes.

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin36,056 lines of code in 147 files:
LanguageFilesBlank linesComment linesLines of code
PHP1238,12117,86134,078
PO File3254468920
CSS15860465
JavaScript55880379
Markdown1680214

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity89.92
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes24.00%
▷ Concrete classes4896.00%
▷ Final classes24.17%
Methods1,288
▷ Static methods20115.61%
▷ Public methods89669.57%
▷ Protected methods171.32%
▷ Private methods37529.11%
Functions153
▷ Named functions15299.35%
▷ Anonymous functions10.65%
Constants148
▷ Global constants10067.57%
▷ Class constants4832.43%
▷ Public constants48100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
includes/images/icon.png40.95KB13.31KB▼ 67.51%
includes/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
includes/images/5StarPlugins_Logo80x80.png2.08KB1.07KB▼ 48.52%