Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.82MB] [CPU: ▲4.50ms] Passed 4 tests
A check of server-side resources used by Avatar Privacy
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.24 ▲0.78 | 46.33 ▲7.31 |
Dashboard /wp-admin | 4.18 ▲0.88 | 51.55 ▲1.74 |
Posts /wp-admin/edit.php | 4.23 ▲0.87 | 55.32 ▲4.95 |
Add New Post /wp-admin/post-new.php | 6.72 ▲0.83 | 92.98 ▲3.99 |
Media Library /wp-admin/upload.php | 4.04 ▲0.81 | 43.77 ▲10.96 |
Server storage [IO: ▲6.05MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 603 new files
Database: 2 new tables, 7 new options
New tables |
---|
wp_avatar_privacy_hashes |
wp_avatar_privacy |
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
avatar_privacy_settings |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Avatar Privacy
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,806 ▲71 | 13.68 ▼0.62 | 1.85 ▲0.08 | 36.16 ▼4.76 |
Dashboard /wp-admin | 2,225 ▲34 | 4.87 ▼1.04 | 102.43 ▼6.93 | 38.30 ▼9.13 |
Posts /wp-admin/edit.php | 2,105 ▲16 | 2.06 ▲0.03 | 40.28 ▼1.27 | 33.11 ▼3.74 |
Add New Post /wp-admin/post-new.php | 6,352 ▲4,832 | 27.82 ▲4.78 | 892.08 ▲225.84 | 58.03 ▲9.81 |
Media Library /wp-admin/upload.php | 1,401 ▲13 | 4.20 ▲0.00 | 93.82 ▼1.82 | 43.16 ▼2.57 |
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
- The uninstall procedure failed, leaving 1 table in the database
- wp_avatar_privacy_hashes
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
Please fix the following
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/avatar-privacy/admin/partials/sections/avatars-disabled-script.php
- 123× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Avatar_Privacy\\Avatar_Handlers\\Avatar_Handler' not found in wp-content/plugins/avatar-privacy/includes/avatar-privacy/avatar-handlers/class-legacy-icon-handler.php:45
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/avatar-privacy/vendor-scoped/mundschenk-at/check-wp-requirements/partials/requirements-error-notice.php:29
- > PHP Notice
Undefined variable: align in wp-content/plugins/avatar-privacy/public/partials/block/avatar.php on line 39
- > PHP Fatal error
Uncaught Error: Class 'Avatar_Privacy\\Avatar_Handlers\\Default_Icons\\Abstract_Icon_Provider' not found in wp-content/plugins/avatar-privacy/includes/avatar-privacy/avatar-handlers/default-icons/class-static-icon-provider.php:39
- > PHP Fatal error
Uncaught Error: Class 'Avatar_Privacy\\Vendor\\Mundschenk\\WP_Requirements' not found in wp-content/plugins/avatar-privacy/includes/avatar-privacy/class-requirements.php:38
- > PHP Fatal error
Uncaught Error: Class 'Avatar_Privacy\\Avatar_Handlers\\Default_Icons\\SVG_Icon_Provider' not found in wp-content/plugins/avatar-privacy/includes/avatar-privacy/avatar-handlers/default-icons/static-icons/class-bowling-pin-icon-provider.php:38
- > PHP Fatal error
Uncaught Error: Class 'Avatar_Privacy\\CLI\\Abstract_Command' not found in wp-content/plugins/avatar-privacy/includes/avatar-privacy/cli/class-database-command.php:47
- > PHP Fatal error
Uncaught Error: Class 'Avatar_Privacy\\Avatar_Handlers\\Default_Icons\\Abstract_Icon_Provider' not found in wp-content/plugins/avatar-privacy/includes/avatar-privacy/avatar-handlers/default-icons/class-custom-icon-provider.php:46
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/avatar-privacy/public/partials/block/avatar.php:44
- > PHP Fatal error
Uncaught Error: Call to a member function avatar_uploader() on null in wp-content/plugins/avatar-privacy/public/partials/shortcode/avatar-upload.php:44
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: avatar, caching, privacy, gravatar, bbpress...
avatar-privacy/avatar-privacy.php Passed 13 tests
"Avatar Privacy" version 2.7.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
55 characters long description:
Adds options to enhance the privacy when using avatars.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin12,205 lines of code in 268 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 192 | 2,400 | 17,081 | 11,459 |
Markdown | 7 | 201 | 0 | 428 |
JavaScript | 9 | 40 | 140 | 200 |
SVG | 54 | 0 | 0 | 54 |
JSON | 2 | 0 | 0 | 48 |
CSS | 4 | 2 | 2 | 16 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 150)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 9.34 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 208.00 |
Average method complexity | 2.45 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 150.00 |
Code structure | ||
---|---|---|
Namespaces | 31 | |
Interfaces | 9 | |
Traits | 0 | |
Classes | 146 | |
▷ Abstract classes | 15 | 10.27% |
▷ Concrete classes | 131 | 89.73% |
▷ Final classes | 0 | 0.00% |
Methods | 915 | |
▷ Static methods | 65 | 7.10% |
▷ Public methods | 665 | 72.68% |
▷ Protected methods | 221 | 24.15% |
▷ Private methods | 29 | 3.17% |
Functions | 42 | |
▷ Named functions | 6 | 14.29% |
▷ Anonymous functions | 36 | 85.71% |
Constants | 247 | |
▷ Global constants | 4 | 1.62% |
▷ Class constants | 243 | 98.38% |
▷ Public constants | 211 | 86.83% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
327 PNG files occupy 4.84MB with 1.89MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/images/wavatars/brow_2.png | 0.39KB | 0.36KB | ▼ 9.23% |
public/images/cats/eyes_13.png | 27.50KB | 11.77KB | ▼ 57.20% |
public/images/wavatars/shine_4.png | 3.31KB | 2.50KB | ▼ 24.42% |
public/images/cats/eyes_15.png | 17.02KB | 7.82KB | ▼ 54.05% |
public/images/cats/eyes_8.png | 18.05KB | 8.96KB | ▼ 50.39% |