Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
- The plugin cannot be installed
- > Notice in wp-content/plugins/phraseanet-client/admin/metabox.php+325
Trying to get property 'cap' of non-object
Server metrics [RAM: ▲0.70MB] [CPU: ▲2.30ms] Passed 4 tests
A check of server-side resources used by Phraseanet Wordpress Client
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.15 ▲0.69 | 39.97 ▼4.24 |
Dashboard /wp-admin | 4.01 ▲0.70 | 54.74 ▲0.98 |
Posts /wp-admin/edit.php | 4.05 ▲0.70 | 55.11 ▲9.23 |
Add New Post /wp-admin/post-new.php | 6.65 ▲0.76 | 101.10 ▲3.22 |
Media Library /wp-admin/upload.php | 3.93 ▲0.71 | 44.38 ▲10.82 |
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius | 4.27 | 39.05 |
Server storage [IO: ▲8.44MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 856 new files
Database: no new tables, 10 new options
New WordPress options |
---|
can_compress_scripts |
fs_active_plugins |
db_upgraded |
fs_accounts |
widget_recent-comments |
widget_recent-posts |
fs_gdpr |
widget_theysaidso_widget |
fs_debug_mode |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Phraseanet Wordpress Client
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,027 ▲281 | 18.56 ▲4.20 | 23.85 ▲22.00 | 31.44 ▼13.33 |
Dashboard /wp-admin | 2,290 ▲102 | 8.17 ▲3.31 | 152.22 ▲45.41 | 81.51 ▲40.00 |
Posts /wp-admin/edit.php | 2,187 ▲98 | 5.01 ▲2.96 | 60.52 ▲24.39 | 33.22 ▼3.94 |
Add New Post /wp-admin/post-new.php | 6,355 ▲4,827 | 29.31 ▲10.83 | 899.39 ▲273.71 | 34.44 ▼28.57 |
Media Library /wp-admin/upload.php | 1,487 ▲102 | 6.54 ▲2.38 | 114.49 ▲13.89 | 43.18 ▲3.11 |
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius | 1,092 | 4.51 | 43.66 | 25.33 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/phraseanet-client/freemius/includes/class-freemius.php+8575
Undefined property: stdClass::$plugins
- Zombie WordPress options were found after uninstall: 10 options
- db_upgraded
- can_compress_scripts
- fs_debug_mode
- widget_recent-posts
- widget_theysaidso_widget
- fs_active_plugins
- fs_gdpr
- theysaidso_admin_options
- widget_recent-comments
- fs_accounts
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)
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/phraseanet-client/admin/partials/phraseanet-admin-display-form-generator.php
- 193× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/phraseanet-client/vendor/phraseanet/php-sdk/tests/PhraseanetSDK/Tests/Http/APIGuzzleAdapterTest.php:10
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/phraseanet-client/vendor/phraseanet/php-sdk/tests/PhraseanetSDK/Tests/Http/APIResponseTest.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/phraseanet-client/vendor/kevinrob/guzzle-cache-middleware/tests/PublicCacheTest.php:25
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/phraseanet-client/vendor/guzzlehttp/psr7/src/InflateStream.php:20
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/phraseanet-client/vendor/psr/http-message/src/RequestInterface.php:24
- > PHP Fatal error
Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/phraseanet-client/vendor/psr/log/Psr/Log/NullLogger.php:13
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/phraseanet-client/vendor/guzzlehttp/psr7/src/NoSeekStream.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/phraseanet-client/admin/partials/logo.php:3
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/phraseanet-client/vendor/psr/log/Psr/Log/AbstractLogger.php:12
- > PHP Fatal error
Uncaught Error: Interface 'PhraseanetSDK\\Http\\GuzzleAdapterInterface' not found in wp-content/plugins/phraseanet-client/vendor/phraseanet/php-sdk/src/PhraseanetSDK/Http/APIGuzzleAdapter.php:7
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
- Requires php: The plugin version is formatted incorrectly
phraseanet-client/phraseanet.php 77% from 13 tests
"Phraseanet Wordpress Client" version 1.3.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("phraseanet-client.php" instead of "phraseanet.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 246 characters long)
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please fix the following items
- Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/phraseanet-client/vendor/phraseanet/php-sdk/docs/make.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 452 | 13,217 | 30,091 | 53,682 |
HTML | 125 | 4,757 | 38 | 20,790 |
JSON | 66 | 5 | 0 | 19,099 |
Markdown | 27 | 1,577 | 0 | 4,801 |
LESS | 37 | 589 | 700 | 3,339 |
CSS | 22 | 308 | 195 | 1,033 |
JavaScript | 17 | 137 | 306 | 845 |
reStructuredText | 8 | 417 | 489 | 409 |
Python | 6 | 128 | 170 | 309 |
PO File | 2 | 94 | 115 | 229 |
XML | 5 | 21 | 2 | 201 |
DOS Batch | 1 | 22 | 1 | 153 |
make | 3 | 38 | 5 | 142 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
- Class cyclomatic complexity should be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 18.12 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,910.00 |
Average method complexity | 2.94 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 37 | |
Interfaces | 40 | |
Traits | 5 | |
Classes | 319 | |
▷ Abstract classes | 11 | 3.45% |
▷ Concrete classes | 308 | 96.55% |
▷ Final classes | 32 | 10.39% |
Methods | 3,329 | |
▷ Static methods | 398 | 11.96% |
▷ Public methods | 2,604 | 78.22% |
▷ Protected methods | 219 | 6.58% |
▷ Private methods | 506 | 15.20% |
Functions | 316 | |
▷ Named functions | 155 | 49.05% |
▷ Anonymous functions | 161 | 50.95% |
Constants | 270 | |
▷ Global constants | 108 | 40.00% |
▷ Class constants | 162 | 60.00% |
▷ Public constants | 157 | 96.91% |
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
13 PNG files occupy 0.46MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
freemius/assets/img/phraseanet-client.png | 67.46KB | 15.63KB | ▼ 76.83% |
vendor/phraseanet/php-sdk/docs/source/_themes/Alchemy/static/img/project.png | 19.75KB | 8.02KB | ▼ 59.42% |
vendor/phraseanet/php-sdk/docs/source/API/API/i/tree_bg.png | 0.20KB | 0.10KB | ▼ 50.24% |
admin/images/phrasea-logo_big.png | 76.93KB | 25.62KB | ▼ 66.69% |