Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
- This plugin did not install gracefully
- > Warning in wp-includes/class-wp-hook.php+310
call_user_func_array() expects parameter 1 to be a valid callback, function 'privacy_policy_activate' not found or invalid function name
Server metrics [RAM: ▼1.81MB] [CPU: ▼39.03ms] Passed 4 tests
Analyzing server-side resources used by Privacy Policy Genius
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.15 ▼1.31 | 13.40 ▼27.59 |
Dashboard /wp-admin | 2.20 ▼1.10 | 19.05 ▼30.45 |
Posts /wp-admin/edit.php | 2.21 ▼1.15 | 20.38 ▼25.31 |
Add New Post /wp-admin/post-new.php | 2.20 ▼3.68 | 20.29 ▼72.75 |
Media Library /wp-admin/upload.php | 2.21 ▼1.02 | 21.47 ▼12.27 |
Privacy Guru /wp-admin/options-general.php?page=privacy_guru | 2.21 | 20.66 |
Server storage [IO: ▲1.32MB] [DB: ▲0.32MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for Privacy Policy Genius
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,928 ▲171 | 13.85 ▼0.44 | 3.79 ▲1.39 | 29.99 ▼19.03 |
Dashboard /wp-admin | 2,251 ▲60 | 4.97 ▼0.93 | 113.59 ▲15.55 | 43.79 ▲4.20 |
Posts /wp-admin/edit.php | 2,142 ▲53 | 2.34 ▲0.28 | 41.01 ▼0.02 | 38.51 ▲1.84 |
Add New Post /wp-admin/post-new.php | 1,549 ▲35 | 17.70 ▲0.08 | 658.75 ▼13.17 | 35.86 ▼27.15 |
Media Library /wp-admin/upload.php | 1,439 ▲48 | 4.40 ▲0.19 | 103.21 ▲7.14 | 44.89 ▲1.03 |
Privacy Guru /wp-admin/options-general.php?page=privacy_guru | 1,459 | 2.64 | 56.72 | 31.96 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.32MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/policy-genius/lib/admin/SettingsField.php+20
Undefined index: value
- Zombie WordPress options detected upon uninstall: 6 options
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=privacy_guru
- > Notice in wp-content/plugins/policy-genius/lib/admin/SettingsField.php+20
Undefined index: value
- > GET request to /wp-admin/options-general.php?page=privacy_guru
- > User notice in wp-includes/functions.php+5905
Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
- 7 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=privacy_guru
- > Notice in wp-content/plugins/policy-genius/includes/admin/SettingsPage.php+58
Undefined index: tab
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 24× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'smartcat\\admin\\SettingsField' not found in wp-content/plugins/policy-genius/lib/admin/RadioBoxField.php:7
- > PHP Fatal error
Uncaught Error: Class 'smartcat\\admin\\SettingsField' not found in wp-content/plugins/policy-genius/includes/admin/CheckBoxGroup.php:8
- > PHP Fatal error
Uncaught Error: Interface 'smartcat\\core\\HookSubscriber' not found in wp-content/plugins/policy-genius/lib/admin/SettingsPage.php:17
- > PHP Fatal error
Uncaught Error: Class 'privacy_policy_genius\\PrivacyPolicy' not found in wp-content/plugins/policy-genius/templates/template.php:9
- > PHP Fatal error
Uncaught Error: Class 'privacy_policy_genius\\admin\\SettingsPage' not found in wp-content/plugins/policy-genius/config/admin_settings.php:22
- > PHP Fatal error
Uncaught Error: Class 'smartcat\\core\\AbstractPlugin' not found in wp-content/plugins/policy-genius/includes/PrivacyPolicy.php:9
- > PHP Fatal error
Uncaught Error: Class 'smartcat\\admin\\SettingsField' not found in wp-content/plugins/policy-genius/includes/admin/HiddenField.php:7
- > PHP Fatal error
Uncaught Error: Class 'smartcat\\admin\\SettingsField' not found in wp-content/plugins/policy-genius/lib/admin/TextField.php:7
- > PHP Fatal error
Uncaught Error: Interface 'smartcat\\admin\\ValidationFilter' not found in wp-content/plugins/policy-genius/includes/admin/CharLimitFilter.php:8
- > PHP Fatal error
Uncaught Error: Class 'smartcat\\admin\\SettingsField' not found in wp-content/plugins/policy-genius/lib/admin/CheckBoxField.php:7
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
- > GET request to /wp-admin/options-general.php?page=privacy_guru
- > Network (severe)
wp-content/plugins/policy-genius/includes//wp-content/plugins/policy-genius/assets/js/admin.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
- Tags: There are too many tags (25 tag instead of maximum 10)
policy-genius/plugin.php 85% from 13 tests
The primary PHP file in "Privacy Policy Genius" version 2.0.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("policy-genius.php" instead of "plugin.php")
- Text Domain: The text domain name should consist of only dashes and lowercase characters
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,521 lines of code in 52 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 44 | 641 | 399 | 2,107 |
CSS | 3 | 24 | 0 | 177 |
JavaScript | 3 | 51 | 33 | 155 |
JSON | 2 | 0 | 0 | 82 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 5.73 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 39.00 |
Average method complexity | 2.37 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 8 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 28 | |
▷ Abstract classes | 3 | 10.71% |
▷ Concrete classes | 25 | 89.29% |
▷ Final classes | 1 | 4.00% |
Methods | 129 | |
▷ Static methods | 14 | 10.85% |
▷ Public methods | 124 | 96.12% |
▷ Protected methods | 2 | 1.55% |
▷ Private methods | 3 | 2.33% |
Functions | 8 | |
▷ Named functions | 4 | 50.00% |
▷ Anonymous functions | 4 | 50.00% |
Constants | 42 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 42 | 100.00% |
▷ Public constants | 42 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.44MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.PNG | 31.46KB | 15.18KB | ▼ 51.75% |
assets/screenshot-3.PNG | 142.46KB | 67.03KB | ▼ 52.95% |
assets/banner-772x250.png | 49.32KB | 17.86KB | ▼ 63.79% |
assets/screenshot-2.PNG | 148.59KB | 68.80KB | ▼ 53.70% |
assets/banner-1544x500.png | 56.90KB | 25.17KB | ▼ 55.77% |