Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.43MB] [CPU: ▼6.97ms] Passed 4 tests
Server-side resources used by PageSpeed Ninja
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.71 ▲0.25 | 35.73 ▼5.91 |
Dashboard /wp-admin | 3.85 ▲0.51 | 50.18 ▼10.68 |
Posts /wp-admin/edit.php | 3.90 ▲0.55 | 52.79 ▲7.69 |
Add New Post /wp-admin/post-new.php | 6.37 ▲0.48 | 86.48 ▼11.30 |
Media Library /wp-admin/upload.php | 3.71 ▲0.48 | 35.83 ▲0.01 |
General /wp-admin/admin.php?page=pagespeedninja | 4.21 | 38.83 |
Advanced /wp-admin/admin.php?page=pagespeedninja_advanced | 4.21 | 39.23 |
Upgrade to Pro /wp-admin/admin.php?page=javascript:void(0) | 3.58 | 28.75 |
Server storage [IO: ▲1.22MB] [DB: ▲0.08MB] 67% from 3 tests
Filesystem and database footprint
Please try to fix the following items
- Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/psn-pagespeed-ninja/" and "wp-content/uploads/"
- (new file) s/.empty
Filesystem: 219 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_psninja_urls |
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
pagespeedninja_config |
widget_recent-comments |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
PageSpeed Ninja: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,877 ▲115 | 14.20 ▼0.51 | 1.71 ▲0.04 | 38.49 ▼4.41 |
Dashboard /wp-admin | 2,282 ▲107 | 5.68 ▼0.03 | 96.78 ▼17.75 | 44.12 ▼0.94 |
Posts /wp-admin/edit.php | 2,191 ▲91 | 2.15 ▲0.22 | 42.15 ▲4.07 | 36.84 ▲0.53 |
Add New Post /wp-admin/post-new.php | 1,582 ▲56 | 23.08 ▼0.14 | 588.18 ▼16.30 | 62.23 ▲20.83 |
Media Library /wp-admin/upload.php | 1,481 ▲81 | 4.21 ▲0.03 | 104.08 ▲8.12 | 42.67 ▼1.37 |
General /wp-admin/admin.php?page=pagespeedninja | 1,087 | 2.00 | 41.71 | 88.92 |
Advanced /wp-admin/admin.php?page=pagespeedninja_advanced | 1,064 | 1.99 | 37.00 | 45.06 |
Upgrade to Pro /wp-admin/admin.php?page=javascript:void(0) | 28 | 0.41 | 0.08 | 3.57 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
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 take a closer look at the following
- 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/psn-pagespeed-ninja/admin/partials/pagespeedninja-survey-form.php:7
- > PHP Fatal error
Uncaught Error: Class 'Ressio_DeviceDetector_Base' not found in wp-content/plugins/psn-pagespeed-ninja/public/ress/wpdevicedetector.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/psn-pagespeed-ninja/includes/options.json.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/psn-pagespeed-ninja/includes/presets.json.php:4
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
- > GET request to /wp-admin/admin.php?page=javascript:void(0)
- > Network (severe)
wp-admin/admin.php?page=javascript:void(0) - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
psn-pagespeed-ninja/pagespeedninja.php 92% from 13 tests
"PageSpeed Ninja" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("psn-pagespeed-ninja.php" instead of "pagespeedninja.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected23,253 lines of code in 200 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 152 | 2,948 | 7,368 | 19,070 |
JavaScript | 25 | 575 | 489 | 2,893 |
CSS | 4 | 107 | 24 | 1,076 |
JSON | 13 | 0 | 0 | 134 |
Markdown | 1 | 25 | 0 | 72 |
HTML | 4 | 0 | 0 | 7 |
SVG | 1 | 0 | 0 | 1 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
- Method cyclomatic complexity has to be reduced to less than 100 (currently 245)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 22.57 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 287.00 |
Average method complexity | 4.98 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 245.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 28 | |
Traits | 0 | |
Classes | 131 | |
▷ Abstract classes | 8 | 6.11% |
▷ Concrete classes | 123 | 93.89% |
▷ Final classes | 2 | 1.63% |
Methods | 1,013 | |
▷ Static methods | 32 | 3.16% |
▷ Public methods | 731 | 72.16% |
▷ Protected methods | 239 | 23.59% |
▷ Private methods | 43 | 4.24% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 82 | |
▷ Global constants | 8 | 9.76% |
▷ Class constants | 74 | 90.24% |
▷ Public constants | 74 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/image/icons.png | 0.14KB | 0.13KB | ▼ 6.21% |
assets/image/ninja.png | 2.05KB | 1.40KB | ▼ 31.47% |
assets/image/arrow.png | 0.49KB | 0.40KB | ▼ 17.71% |
assets/image/pagespeed-ninja-logo.png | 17.25KB | 8.63KB | ▼ 49.96% |