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
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼8.32ms] Passed 4 tests
An overview of server-side resources used by U.S. Debt Clock Widget
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 41.09 ▼1.31 |
Dashboard /wp-admin | 3.32 ▼0.03 | 49.65 ▼10.31 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 46.87 ▼0.78 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 81.87 ▼20.86 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 37.69 ▲0.03 |
Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
widget_us_debtclock_widget |
Browser metrics Passed 4 tests
U.S. Debt Clock Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲43 | 14.35 ▼0.02 | 1.72 ▼0.18 | 45.94 ▼0.06 |
Dashboard /wp-admin | 2,192 ▲12 | 5.48 ▼0.17 | 86.27 ▼7.80 | 35.54 ▼3.97 |
Posts /wp-admin/edit.php | 2,097 ▼0 | 2.00 ▼0.03 | 35.93 ▼2.14 | 34.82 ▼2.52 |
Add New Post /wp-admin/post-new.php | 1,528 ▲2 | 23.27 ▲0.36 | 654.95 ▼32.87 | 54.59 ▼12.32 |
Media Library /wp-admin/upload.php | 1,394 ▼6 | 4.23 ▲0.08 | 97.85 ▼13.84 | 43.92 ▼3.45 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 7 options in the database
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_us_debtclock_widget
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 50% 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 0% 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
Please take a closer look at the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/us-debt-clock-widget/us-debt-clock-widget.php
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/us-debt-clock-widget/tests/bootstrap.php on line 6
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/us-debt-clock-widget/tests/bootstrap.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/us-debt-clock-widget/tests/test-us-debtclock-widget.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
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
6 plugin tags: finance, widgets, money, economy, government...
us-debt-clock-widget/us-debt-clock-widget.php Passed 13 tests
"U.S. Debt Clock Widget" version 1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
42 characters long description:
Display the U.S. national debt in a widget
Code Analysis Passed 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
There were no executable files found in this plugin303 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 80 | 80 | 206 |
Bourne Shell | 1 | 15 | 4 | 59 |
XML | 1 | 0 | 0 | 14 |
CSS | 1 | 2 | 0 | 12 |
YAML | 1 | 4 | 0 | 12 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 10.67 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 21.00 |
Average method complexity | 3.64 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 11 | |
▷ Static methods | 1 | 9.09% |
▷ Public methods | 11 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.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
Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 29.08KB | 9.50KB | ▼ 67.32% |
screenshot-1.png | 11.23KB | 4.10KB | ▼ 63.50% |