Benchmarks
Plugin footprint 83% 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.02MB] [CPU: ▼302.94ms] Passed 4 tests
An overview of server-side resources used by Agy - Age verification for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.01 | 58.30 ▲8.81 |
Dashboard /wp-admin | 3.41 ▲0.01 | 32.17 ▼1.13 |
Posts /wp-admin/edit.php | 3.64 ▲0.01 | 36.21 ▼1.28 |
Add New Post /wp-admin/post-new.php | 6.91 ▼0.09 | 91.36 ▼1,207.98 |
Media Library /wp-admin/upload.php | 3.30 ▲0.00 | 22.57 ▼1.37 |
Server storage [IO: ▲4.34MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 248 new files
Database: no new tables, 4 new options
New WordPress options |
---|
fs_accounts |
fs_active_plugins |
fs_gdpr |
fs_debug_mode |
Browser metrics Passed 4 tests
Agy - Age verification for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,795 ▲41 | 15.53 ▼0.06 | 6.56 ▼0.28 | 2.76 ▲0.08 |
Dashboard /wp-admin | 2,892 ▲31 | 6.17 ▼0.01 | 126.06 ▼16.93 | 161.12 ▼8.06 |
Posts /wp-admin/edit.php | 2,694 ▼0 | 3.24 ▼0.00 | 63.38 ▼3.49 | 146.47 ▲0.48 |
Add New Post /wp-admin/post-new.php | 1,661 ▼11 | 16.68 ▼5.39 | 433.07 ▲30.85 | 163.84 ▲4.57 |
Media Library /wp-admin/upload.php | 1,695 ▼3 | 5.50 ▼0.02 | 144.32 ▲10.67 | 191.19 ▲8.76 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- The uninstall procedure has failed, leaving 4 options in the database
- fs_accounts
- fs_gdpr
- fs_debug_mode
- fs_active_plugins
Smoke tests 50% 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 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/content-warning-v2/src/templates/accept-age.php
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/content-warning-v2/content-warning-v2.php:18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: content warning, age verification, age restriction, age gate, page gate...
content-warning-v2/content-warning-v2.php 92% from 13 tests
The main file in "Agy - Age verification for WooCommerce" v. 4.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
- Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "4.5")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin51,139 lines of code in 197 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 125 | 7,489 | 16,766 | 32,461 |
PO File | 13 | 7,111 | 8,729 | 15,496 |
Sass | 28 | 399 | 77 | 2,515 |
CSS | 17 | 30 | 1 | 310 |
JavaScript | 9 | 57 | 76 | 289 |
JSON | 2 | 0 | 0 | 28 |
Markdown | 1 | 7 | 0 | 22 |
XML | 1 | 0 | 0 | 17 |
SVG | 1 | 0 | 0 | 1 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,911)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 77.47 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,911.00 |
Average method complexity | 4.54 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 55 | |
▷ Abstract classes | 2 | 3.64% |
▷ Concrete classes | 53 | 96.36% |
▷ Final classes | 0 | 0.00% |
Methods | 1,218 | |
▷ Static methods | 186 | 15.27% |
▷ Public methods | 877 | 72.00% |
▷ Protected methods | 15 | 1.23% |
▷ Private methods | 326 | 26.77% |
Functions | 102 | |
▷ Named functions | 100 | 98.04% |
▷ Anonymous functions | 2 | 1.96% |
Constants | 125 | |
▷ Global constants | 100 | 80.00% |
▷ Class constants | 25 | 20.00% |
▷ Public constants | 25 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
inc/freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
inc/freemius/assets/img/content-warning-v2.png | 9.16KB | 5.26KB | ▼ 42.58% |
inc/freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |