Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
- Install procedure validation failed for this plugin
- > Notice in wp-content/plugins/wp-viewport/wp-viewport.php+27
Trying to access array offset on value of type bool
Server metrics [RAM: ▲0.01MB] [CPU: ▼9.33ms] Passed 4 tests
This is a short check of server-side resources used by WP Viewport
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 38.20 ▼2.19 |
Dashboard /wp-admin | 3.33 ▼0.01 | 43.46 ▼30.72 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 43.96 ▼2.58 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 91.11 ▲0.82 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 34.40 ▼1.84 |
WP Viewport /wp-admin/options-general.php?page=wpviewport-settings | 3.22 | 28.41 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
wpviewport_options |
Browser metrics Passed 4 tests
A check of browser resources used by WP Viewport
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,925 ▲179 | 13.55 ▼0.76 | 9.45 ▲7.73 | 43.24 ▼1.29 |
Dashboard /wp-admin | 2,210 ▲19 | 5.87 ▲0.95 | 106.03 ▼8.66 | 42.10 ▲4.09 |
Posts /wp-admin/edit.php | 2,096 ▲4 | 2.00 ▼0.05 | 39.34 ▲2.53 | 33.90 ▲0.31 |
Add New Post /wp-admin/post-new.php | 1,538 ▲3 | 22.98 ▼0.35 | 588.11 ▼93.18 | 53.75 ▼4.32 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.28 ▲0.07 | 97.29 ▼13.84 | 43.60 ▼3.89 |
WP Viewport /wp-admin/options-general.php?page=wpviewport-settings | 842 | 2.06 | 23.66 | 25.46 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- Zombie WordPress options were found after uninstall: 7 options
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- wpviewport_options
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 50% 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
Almost there! Just fix the following items
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-viewport/wp-viewport.php:15
- > 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 is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: responsive, viewport
wp-viewport/wp-viewport.php Passed 13 tests
The principal PHP file in "WP Viewport" v. 1.0 is loaded by WordPress automatically on each request
137 characters long description:
A handy little tool that display the viewport size of any computer or mobile device for testing responsive web designs and media queries.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected140 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 28 | 30 | 102 |
CSS | 1 | 1 | 0 | 23 |
JavaScript | 1 | 8 | 6 | 15 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.17 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 8 | |
▷ Named functions | 8 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/resize.png | 3.28KB | 0.49KB | ▼ 85.03% |