78% dispensary-age-verification

Code Review | Age Verification

WordPress plugin Age Verification scored78%from 54 tests.

About plugin

  • Plugin page: dispensary-age-ve...
  • Plugin version: 2.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.0
  • WordPress version: 6.3.1
  • First release: Nov 9, 2016
  • Latest release: Aug 12, 2023
  • Number of updates: 58
  • Update frequency: every 42.7 days
  • Top authors: deviodigital (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

9,000+ active /101,899 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.55ms] Passed 4 tests

This is a short check of server-side resources used by Age Verification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.83 ▼2.10
Dashboard /wp-admin3.39 ▲0.0946.87 ▼1.15
Posts /wp-admin/edit.php3.50 ▲0.1548.04 ▲1.49
Add New Post /wp-admin/post-new.php5.97 ▲0.0984.39 ▲0.02
Media Library /wp-admin/upload.php3.31 ▲0.0932.82 ▼2.98

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Age Verification
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲24013.65 ▼0.7212.23 ▲10.4948.49 ▲1.14
Dashboard /wp-admin2,206 ▲215.88 ▲0.02107.79 ▼0.1042.48 ▲1.25
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0438.31 ▼2.9636.07 ▼2.21
Add New Post /wp-admin/post-new.php1,519 ▼1423.35 ▲0.10676.25 ▲22.8651.91 ▼6.44
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.1494.96 ▼9.1443.09 ▼0.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dispensary-age-verification/admin/partials/dispensary-age-verification-admin-display.php
    • > /wp-content/plugins/dispensary-age-verification/public/partials/dispensary-age-verification-public-display.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/dispensary-age-verification/uninstall.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/dispensary-age-verification/dispensary-age-verification.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-age-verification/public/class-dispensary-age-verification-public.php:154
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-age-verification/includes/customizer.php:199

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Tags: There are too many tags (19 tag instead of maximum 10)
You can look at the official readme.txt

dispensary-age-verification/dispensary-age-verification.php 92% from 13 tests

The principal PHP file in "Age Verification" v. 2.9.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 155 characters long)

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
There were no executable files found in this plugin1,452 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PO File8196256627
PHP15137670429
JavaScript31349208
CSS3198150
Markdown117038

PHP code Passed 2 tests

Analyzing 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.17
Average class complexity1.71
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin