Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.17MB] [CPU: ▼9.10ms] Passed 4 tests
Server-side resources used by Sur.ly
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.69 ▲0.19 | 41.90 ▲1.13 |
Dashboard /wp-admin | 3.53 ▲0.14 | 49.51 ▼16.55 |
Posts /wp-admin/edit.php | 3.64 ▲0.24 | 52.24 ▲0.54 |
Add New Post /wp-admin/post-new.php | 6.11 ▲0.18 | 90.96 ▼21.51 |
Media Library /wp-admin/upload.php | 3.45 ▲0.18 | 42.12 ▲4.39 |
Server storage [IO: ▲1.13MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_shortener_cache |
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
surly_activation_hash |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Sur.ly
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,798 ▲52 | 14.26 ▼0.14 | 1.79 ▲0.14 | 39.67 ▼4.40 |
Dashboard /wp-admin | 2,204 ▲26 | 5.63 ▼0.02 | 86.61 ▼9.22 | 39.30 ▼4.45 |
Posts /wp-admin/edit.php | 2,109 ▲9 | 2.02 ▼0.03 | 39.20 ▼1.01 | 35.14 ▼4.02 |
Add New Post /wp-admin/post-new.php | 1,536 ▲10 | 23.15 ▼0.41 | 687.28 ▲18.99 | 68.55 ▲12.97 |
Media Library /wp-admin/upload.php | 1,412 ▲12 | 4.20 ▼0.06 | 113.67 ▲8.13 | 47.63 ▲2.59 |
Sur.ly /wp-admin/surly.php | 26 | 0.42 | 0.09 | 20.83 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- db_upgraded
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
- 13× 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/surly/lib/surly-sdk-php/surly/tests/ReplaceTest.php:3
- > PHP Warning
require_once(path_to_surly-sdk/Surly.php): failed to open stream: No such file or directory in wp-content/plugins/surly/lib/surly-sdk-php/surly/examples/basic.php on line 16
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/surly/lib/surly-sdk-php/surly/tests/BackupHostTest.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/surly/surly.php:413
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/surly/lib/surly-sdk-php/surly/tests/ShortenerTest.php:3
- > PHP Fatal error
require_once(): Failed opening required 'path_to_surly-sdk/Surly.php' (include_path='.:/usr/share/php') in wp-content/plugins/surly/lib/surly-sdk-php/surly/examples/basic.php on line 16
- > PHP Fatal error
Uncaught Error: Call to undefined method Surly::_callShortenerServiceCurl() in wp-content/plugins/surly/lib/surly-sdk-php/surly/tests/test-timeouts.php:54
- > PHP Warning
Use of undefined constant SURLY_PANEL_URL - assumed 'SURLY_PANEL_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/surly/surly-settings-toolbar.php on line 11
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/surly/surly-settings-toolbar.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/surly/surly-settings-plugin.php:15
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
- > GET request to /wp-admin/surly.php
- > Network (severe)
wp-admin/surly.php - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
- Tags: There are too many tags (32 tag instead of maximum 10)
surly/surly.php 92% from 13 tests
The principal PHP file in "Sur.ly" v. 3.0.3 is loaded by WordPress automatically on each request
You should first fix the following items:
- Description: The description should be shorter than 140 characters (currently 181 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin5,528 lines of code in 23 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 15 | 659 | 630 | 3,502 |
CSS | 3 | 6 | 36 | 1,129 |
SVG | 1 | 0 | 0 | 655 |
JavaScript | 4 | 83 | 8 | 242 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 26.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 115.00 |
Average method complexity | 3.30 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 67.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 99 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 98 | 98.99% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 1.01% |
Functions | 32 | |
▷ Named functions | 32 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 32 | |
▷ Global constants | 32 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
10 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
static/img/elements/mcheck.png | 1.10KB | 0.34KB | ▼ 69.14% |
static/img/toolbar-img.png | 31.34KB | 15.14KB | ▼ 51.70% |
static/img/elements/icon-zip-1.png | 1.04KB | 0.19KB | ▼ 82.08% |
static/img/elements/icon-settings-1.png | 1.41KB | 0.53KB | ▼ 62.12% |
static/img/elements/lightning.png | 1.27KB | 0.47KB | ▼ 62.67% |