Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.12MB] [CPU: ▼145.85ms] Passed 4 tests
This is a short check of server-side resources used by Server Info
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.88 ▲0.16 | 33.57 ▲12.05 |
Dashboard /wp-admin | 3.15 ▲0.10 | 37.23 ▼6.42 |
Posts /wp-admin/edit.php | 3.20 ▲0.10 | 41.91 ▼0.34 |
Add New Post /wp-admin/post-new.php | 5.73 ▲0.30 | 79.54 ▼571.16 |
Media Library /wp-admin/upload.php | 3.11 ▲0.11 | 31.31 ▼5.48 |
Server Info /wp-admin/options-general.php?page=server_info_display | 3.05 | 35.39 |
Server storage [IO: ▲3.47MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 208 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for Server Info
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,840 ▲244 | 16.15 ▲0.55 | 9.53 ▼1.23 | 50.22 ▲1.66 |
Dashboard /wp-admin | 3,101 ▲170 | 5.94 ▲0.00 | 148.18 ▲5.99 | 133.05 ▲24.22 |
Posts /wp-admin/edit.php | 2,730 ▼9 | 2.60 ▼0.12 | 63.68 ▲2.42 | 89.83 ▲3.40 |
Add New Post /wp-admin/post-new.php | 2,066 ▲383 | 19.44 ▲0.91 | 385.01 ▲29.62 | 115.18 ▲6.58 |
Media Library /wp-admin/upload.php | 1,744 ▼66 | 5.01 ▼0.01 | 142.58 ▲1.30 | 120.93 ▼1.07 |
Server Info /wp-admin/options-general.php?page=server_info_display | 1,369 | 2.09 | 51.52 | 127.68 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
The following issues need your attention
- 5× PHP files output text when accessed directly:
- > /wp-content/plugins/server-info/freemius/templates/ajax-loader.php
- > /wp-content/plugins/server-info/index.php
- > /wp-content/plugins/server-info/functions.php
- > /wp-content/plugins/server-info/classes/classes.php
- > /wp-content/plugins/server-info/actions/actions.php
- 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/server-info/freemius/templates/account/partials/addon.php on line 8
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/server-info/freemius/templates/account/partials/addon.php on line 7
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/server-info/freemius/templates/account/partials/addon.php on line 6
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/server-info/freemius/templates/account/partials/addon.php on line 6
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/server-info/freemius/templates/account/partials/addon.php on line 8
- > PHP Fatal error
Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/server-info/freemius/templates/account/partials/addon.php:9
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/server-info/freemius/templates/account/partials/addon.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function freemius() in wp-content/plugins/server-info/freemius/templates/partials/network-activation.php:6
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: widget, dashboard, operating system, wordpress, version...
server-info/index.php 77% from 13 tests
"Server Info" version 2.5.3'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:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 325 characters long)
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Main file name: The principal plugin file should be the same as the plugin slug ("server-info.php" instead of "index.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin41,546 lines of code in 162 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 108 | 6,454 | 14,550 | 26,438 |
PO File | 10 | 5,550 | 6,667 | 12,010 |
Sass | 28 | 399 | 77 | 2,515 |
JavaScript | 4 | 54 | 99 | 301 |
Markdown | 1 | 61 | 0 | 192 |
CSS | 11 | 76 | 0 | 90 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,360)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.60 |
Average class complexity | 73.78 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,360.00 |
Average method complexity | 4.28 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 83.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 46 | |
▷ Abstract classes | 2 | 4.35% |
▷ Concrete classes | 44 | 95.65% |
▷ Final classes | 0 | 0.00% |
Methods | 1,051 | |
▷ Static methods | 171 | 16.27% |
▷ Public methods | 737 | 70.12% |
▷ Protected methods | 15 | 1.43% |
▷ Private methods | 299 | 28.45% |
Functions | 91 | |
▷ Named functions | 91 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 117 | |
▷ Global constants | 97 | 82.91% |
▷ Class constants | 20 | 17.09% |
▷ Public constants | 20 | 100.00% |
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
4 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 4 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/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
screenshot-2.png | 86.97KB | 32.79KB | ▼ 62.29% |
screenshot-1.png | 17.78KB | 6.95KB | ▼ 60.94% |