Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.19MB] [CPU: ▼0.72ms] Passed 4 tests
Analyzing server-side resources used by Pocket Widget
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.66 ▲0.19 | 44.22 ▼1.39 |
Dashboard /wp-admin | 3.49 ▲0.19 | 51.42 ▲1.53 |
Posts /wp-admin/edit.php | 3.61 ▲0.25 | 49.26 ▲1.80 |
Add New Post /wp-admin/post-new.php | 6.07 ▲0.18 | 92.59 ▼4.81 |
Media Library /wp-admin/upload.php | 3.42 ▲0.18 | 39.33 ▲2.43 |
Pocket widget /wp-admin/options-general.php?page=pocketwidget | 3.36 | 36.38 |
Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
widget_pocketwidget |
theysaidso_admin_options |
pocketwidget_access_token |
pocketwidget_consumer_key |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Pocket Widget
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.34 ▼0.03 | 1.70 ▼0.23 | 41.19 ▲0.79 |
Dashboard /wp-admin | 2,196 ▲16 | 5.50 ▼0.07 | 85.21 ▼5.92 | 40.49 ▼7.68 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 1.97 ▼0.06 | 42.25 ▲3.43 | 35.94 ▼5.63 |
Add New Post /wp-admin/post-new.php | 1,531 ▲5 | 23.18 ▲0.11 | 659.52 ▲0.26 | 54.14 ▼1.18 |
Media Library /wp-admin/upload.php | 1,407 ▲10 | 4.20 ▼0.02 | 96.48 ▼6.33 | 45.47 ▲1.79 |
Pocket widget /wp-admin/options-general.php?page=pocketwidget | 858 | 2.01 | 23.41 | 26.14 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- This plugin did not uninstall successfully, leaving 9 options in the database
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- pocketwidget_access_token
- db_upgraded
- widget_pocketwidget
- pocketwidget_consumer_key
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
- 4 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=pocketwidget
- > Warning in wp-content/plugins/pocket-widget/inc/HTMLElement.php+16
count(): Parameter must be an array or an object that implements Countable
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 2× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/pocket-widget/authenticate.php
- > /wp-content/plugins/pocket-widget/callback.php
- 6× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Notice
Undefined index: consumer_key in wp-content/plugins/pocket-widget/authenticate.php on line 4
- > PHP Notice
Undefined offset: 1 in wp-content/plugins/pocket-widget/authenticate.php on line 29
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pocket-widget/PocketWidget.php:3
- > PHP Notice
Undefined index: callback_uri in wp-content/plugins/pocket-widget/authenticate.php on line 5
- > PHP Warning
file_get_contents(https://getpocket.com/v3/oauth/request): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request\r in wp-content/plugins/pocket-widget/authenticate.php on line 26
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/pocket-widget/PocketWidgetPlugin.php:32
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
- Plugin Name: Please specify the plugin name on the first line (
=== pocket-widget ===
)
pocket-widget/PocketWidgetPlugin.php 92% from 13 tests
"Pocket Widget" version 0.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("pocket-widget.php" instead of "PocketWidgetPlugin.php")
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
No dangerous file extensions were detected856 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 73 | 280 | 774 |
PO File | 1 | 18 | 37 | 55 |
JavaScript | 1 | 0 | 0 | 27 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 23.80 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 52.00 |
Average method complexity | 3.59 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 28.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 44 | |
▷ Static methods | 11 | 25.00% |
▷ Public methods | 27 | 61.36% |
▷ Protected methods | 12 | 27.27% |
▷ Private methods | 5 | 11.36% |
Functions | 14 | |
▷ Named functions | 14 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin