74% meta-age

Code Review | Meta Age Verification

WordPress plugin Meta Age Verification scored74%from 54 tests.

About plugin

  • Plugin page: meta-age
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Jun 17, 2022
  • Latest release: Sep 20, 2023
  • Number of updates: 33
  • Update frequency: every 14.0 days
  • Top authors: nabeel323 (42.42%)wpclevel (39.39%)khushwantsidhu (12.12%)blackworks1 (9.09%)djter3a3 (9.09%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,011 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▲423.64ms] 50% from 4 tests

Server-side resources used by Meta Age Verification
Please fix the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 633.74ms on /wp-admin/admin.php?page=meta-age-settings)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 423.64ms on /wp-admin/admin.php?page=meta-age-settings)
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2929.68 ▼7.37
Dashboard /wp-admin3.62 ▲0.28628.80 ▲571.00
Posts /wp-admin/edit.php3.67 ▲0.32624.05 ▲576.59
Add New Post /wp-admin/post-new.php6.14 ▲0.26646.16 ▲554.34
Media Library /wp-admin/upload.php3.48 ▲0.25660.92 ▲628.49
Plugin Activation /wp-admin/admin.php?page=meta-age-activation3.61611.78
Meta Age Verification /wp-admin/admin.php?page=meta-age-tos3.45623.73
Settings /wp-admin/admin.php?page=meta-age-settings3.45633.74

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 63 new files
Database: 2 new tables, 8 new options
New tables
meta_wallet_connections
meta_age_sessions
New WordPress options
widget_theysaidso_widget
db_upgraded
meta_private_key
widget_recent-comments
meta_public_key
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Meta Age Verification
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,001 ▲25518.67 ▲3.99258.31 ▲256.6746.54 ▲8.13
Dashboard /wp-admin2,250 ▲625.78 ▲0.8796.53 ▼9.0043.76 ▼0.18
Posts /wp-admin/edit.php2,135 ▲462.03 ▲0.0158.35 ▲14.3838.86 ▼5.96
Add New Post /wp-admin/post-new.php1,550 ▲2017.88 ▼0.65644.49 ▲47.3055.41 ▲5.62
Media Library /wp-admin/upload.php1,438 ▲474.26 ▲0.1194.62 ▼5.3644.69 ▲0.57
Plugin Activation /wp-admin/admin.php?page=meta-age-activation8601.7723.4227.24
Meta Age Verification /wp-admin/admin.php?page=meta-age-tos9692.1822.8727.92
Settings /wp-admin/admin.php?page=meta-age-settings9612.1524.5432.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • meta_age_sessions
    • meta_wallet_connections
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • db_upgraded
    • meta_private_key
    • widget_theysaidso_widget
    • widget_recent-comments
    • meta_public_key
    • theysaidso_admin_options
    • widget_recent-posts

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/meta-age/common/shortcode.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/meta-age/admin/hooks.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/meta-age/frontend/templates/popup.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/meta-age/common/hooks.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/meta-age/admin/class-settings-page.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/meta-age/meta-age.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/meta-age/admin/class-terms-page.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/meta-age/frontend/hooks.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/meta-age/admin/class-plugin-activator.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: protected, protect, private, content-locker, age-restrict...

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

The main file in "Meta Age Verification" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
38 characters long description:
Verify users' age with crypto wallets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin12,810 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
JSON5008,106
PHP305191,0323,602
JavaScript109371647
Markdown3870338
Sass2200116
CSS2101

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity17.13
▷ Minimum class complexity1.00
▷ Maximum class complexity71.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes426.67%
Methods104
▷ Static methods5552.88%
▷ Public methods8177.88%
▷ Protected methods00.00%
▷ Private methods2322.12%
Functions19
▷ Named functions1789.47%
▷ Anonymous functions210.53%
Constants19
▷ Global constants526.32%
▷ Class constants1473.68%
▷ Public constants642.86%

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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/walletconnect.png29.91KB12.08KB▼ 59.61%