Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▼0.76MB] [CPU: ▼35.75ms] Passed 4 tests
Analyzing server-side resources used by Hammy
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.66 ▲0.20 | 25.36 ▼17.71 |
Dashboard /wp-admin | 3.19 ▼0.12 | 23.43 ▼31.52 |
Posts /wp-admin/edit.php | 3.19 ▼0.17 | 27.70 ▼19.76 |
Add New Post /wp-admin/post-new.php | 3.19 ▼2.70 | 24.55 ▼74.01 |
Media Library /wp-admin/upload.php | 3.19 ▼0.04 | 22.65 ▼14.10 |
Server storage [IO: ▲2.56MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 54 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
db_upgraded |
widget_recent-comments |
hammy_options |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Hammy
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,908 ▲151 | 13.64 ▼0.67 | 5.20 ▲2.84 | 37.15 ▼5.12 |
Dashboard /wp-admin | 2,220 ▲32 | 4.87 ▼0.98 | 108.14 ▲11.38 | 40.14 ▼5.32 |
Posts /wp-admin/edit.php | 2,103 ▲14 | 2.10 ▲0.06 | 39.13 ▼1.39 | 33.86 ▼3.79 |
Add New Post /wp-admin/post-new.php | 1,609 ▲73 | 23.68 ▲0.53 | 608.20 ▼1.66 | 53.38 ▲0.53 |
Media Library /wp-admin/upload.php | 1,396 ▲14 | 4.26 ▲0.08 | 100.78 ▲4.05 | 42.40 ▼1.85 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.08MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin cannot be uninstalled
- > Warning in wp-includes/class-wp-hook.php+310
call_user_func_array() expects parameter 1 to be a valid callback, function 'hammy_add_page' not found or invalid function name
- Zombie WordPress options detected upon uninstall: 7 options
- db_upgraded
- hammy_options
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
The following issues need your attention
- 26× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/hammy/WPThumb/tests/bootstrap.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'WP_Thumb_UnitTestCase' not found in wp-content/plugins/hammy/WPThumb/tests/defaultImageTest.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/hammy/WPThumb/wpthumb.shortcodes.php:11
- > PHP Fatal error
Uncaught Error: Class 'WP_Thumb_UnitTestCase' not found in wp-content/plugins/hammy/WPThumb/tests/backgroundFillAutoTest.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hammy/WPThumb/wpthumb.crop-from-position.php:15
- > PHP Fatal error
Uncaught Error: Class 'WP_Thumb_UnitTestCase' not found in wp-content/plugins/hammy/WPThumb/tests/backgroundFillTest.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/hammy/hammy.php:21
- > PHP Fatal error
Uncaught Error: Class 'WP_Thumb_UnitTestCase' not found in wp-content/plugins/hammy/WPThumb/tests/cropTest.php:6
- > PHP Fatal error
Uncaught Error: Class 'WP_Thumb_UnitTestCase' not found in wp-content/plugins/hammy/WPThumb/tests/resizeTest.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/hammy/WPThumb/wpthumb.php:28
- > 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)
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
- Screenshots: Add an image for screenshot #1 (Options Screen)
- Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
hammy/hammy.php Passed 13 tests
The main PHP script in "Hammy" version 1.5.1 is automatically included on every request by WordPress
76 characters long description:
Creates adaptive images for your content area with breakpoints that you set.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin2,111 lines of code in 37 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 23 | 935 | 446 | 1,655 |
JavaScript | 5 | 189 | 108 | 232 |
CSS | 2 | 12 | 6 | 97 |
Markdown | 3 | 37 | 0 | 63 |
XML | 2 | 0 | 0 | 25 |
Bourne Shell | 1 | 7 | 3 | 22 |
YAML | 1 | 5 | 0 | 17 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.18 |
Average class complexity | 5.20 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 63.00 |
Average method complexity | 1.91 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 19 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 19 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 93 | |
▷ Static methods | 2 | 2.15% |
▷ Public methods | 87 | 93.55% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 6.45% |
Functions | 42 | |
▷ Named functions | 41 | 97.62% |
▷ Anonymous functions | 1 | 2.38% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 2.31MB with 1.66MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
WPThumb/tests/images/checked.png | 50.64KB | 0.09KB | ▼ 99.82% |
WPThumb/tests/images/black.png | 0.41KB | 0.09KB | ▼ 78.30% |
WPThumb/tests/images/white-10.png | 0.19KB | 0.08KB | ▼ 56.77% |
WPThumb/tests/images/boxed.png | 0.21KB | 0.09KB | ▼ 56.40% |
WPThumb/tests/images/UpperCase.png | 21.51KB | 6.98KB | ▼ 67.57% |