Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼4.21ms] Passed 4 tests
A check of server-side resources used by Better Formats
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.01 | 40.93 ▼7.82 |
Dashboard /wp-admin | 3.33 ▲0.02 | 51.23 ▼0.20 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 45.56 ▼11.10 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 94.99 ▲2.28 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 37.86 ▲5.15 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
theysaidso_admin_options |
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Better Formats
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.08 ▼0.27 | 1.72 ▲0.08 | 45.62 ▲0.71 |
Dashboard /wp-admin | 2,199 ▲31 | 5.60 ▲0.08 | 89.83 ▼0.29 | 43.01 ▲0.72 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.00 ▲0.06 | 34.42 ▼0.85 | 34.11 ▼5.15 |
Add New Post /wp-admin/post-new.php | 1,530 ▼7 | 23.25 ▲5.17 | 642.71 ▼22.03 | 59.36 ▼14.87 |
Media Library /wp-admin/upload.php | 1,407 ▲7 | 4.25 ▼0.00 | 98.55 ▼9.12 | 45.67 ▲1.79 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
Smoke tests 75% 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-formats/init.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/better-formats/templates/meta-box.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/better-formats/templates/admin-help.php:14
- > PHP Fatal error
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)
No browser issues were found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: ui, post, post-formats, usability, retina...
better-formats/init.php 92% from 13 tests
Analyzing the main PHP file in "Better Formats" version 0.2
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("better-formats.php" instead of "init.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin470 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
Sass | 1 | 14 | 1 | 177 |
PHP | 3 | 34 | 72 | 151 |
CSS | 1 | 7 | 20 | 127 |
JavaScript | 2 | 3 | 4 | 15 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 2.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 2.00 |
Average method complexity | 1.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 2.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 8 | |
▷ Static methods | 8 | 100.00% |
▷ Public methods | 8 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
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/formats-selected.png | 4.72KB | 3.04KB | ▼ 35.58% |
assets/formats-sprite-2x.png | 6.00KB | 3.73KB | ▼ 37.85% |
assets/formats-selected-2x.png | 9.00KB | 5.39KB | ▼ 40.13% |
assets/formats-sprite.png | 3.56KB | 2.09KB | ▼ 41.31% |