Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼12.75ms] Passed 4 tests
Analyzing server-side resources used by WAJ Image
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.10 ▼0.36 | 20.01 ▼20.80 |
Dashboard /wp-admin | 3.58 ▲0.27 | 45.09 ▼2.88 |
Posts /wp-admin/edit.php | 3.63 ▲0.27 | 46.53 ▲0.86 |
Add New Post /wp-admin/post-new.php | 6.09 ▲0.21 | 80.43 ▼28.18 |
Media Library /wp-admin/upload.php | 3.44 ▲0.21 | 35.32 ▲1.17 |
Directories /wp-admin/themes.php?page=theme_directories | 3.54 | 31.34 |
Server storage [IO: ▲0.65MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 230 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
theme_directories_options |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
WAJ Image: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 14.48 ▲0.11 | 1.61 ▼0.18 | 40.46 ▼3.20 |
Dashboard /wp-admin | 2,213 ▲64 | 4.87 ▼0.72 | 96.03 ▼3.24 | 37.59 ▼1.00 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.03 ▼0.01 | 38.73 ▼1.91 | 35.09 ▲0.32 |
Add New Post /wp-admin/post-new.php | 1,545 ▲26 | 18.30 ▼4.78 | 601.33 ▼36.13 | 53.39 ▲2.55 |
Media Library /wp-admin/upload.php | 1,386 ▼2 | 4.24 ▲0.00 | 97.41 ▼0.23 | 40.87 ▼1.07 |
Directories /wp-admin/themes.php?page=theme_directories | 781 | 2.03 | 27.19 | 27.00 |
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 did not uninstall successfully, leaving 7 options in the database
- theme_directories_options
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
- 32× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WaughJ\\HTMLImage\\HTMLImage' not found in wp-content/plugins/waj-image/vendor/waughj/wp-theme-image/src/WPThemeImage.php:10
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image/vendor/waughj/wp-upload-image/tests/WPUploadImageTest.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function WaughJ\\WPThemeOption\\__() in wp-content/plugins/waj-image/vendor/waughj/wp-theme-option/src/WPThemeOptionsPage.php:11
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image/vendor/waughj/wp-get-image-sizes/tests/WPGetImageSizesTest.php:9
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image/vendor/waughj/verified-arguments/tests/VerifiedArgumentsTest.php:6
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image/vendor/waughj/html-image/tests/HTMLImageTest.php:13
- > PHP Fatal error
Uncaught Error: Class 'WaughJ\\VerifiedArguments\\VerifiedArguments' not found in wp-content/plugins/waj-image/vendor/waughj/verified-arguments-same-type/src/VerifiedArgumentsSameType.php:8
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image/vendor/waughj/wp-theme-image/tests/WPThemeImageTest.php:10
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image/vendor/waughj/html-image/tests/SrcSetTest.php:11
- > PHP Fatal error
Uncaught Error: Class 'WaughJ\\WPUploadPicture\\WPUploadPicture' not found in wp-content/plugins/waj-image/vendor/waughj/wp-post-thumbnail/src/WPPostThumbnail.php:8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: html generator, loader, image
waj-image/waj-image.php 92% from 13 tests
The main PHP file in "WAJ Image" ver. 3.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected7,263 lines of code in 129 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 80 | 952 | 1,409 | 5,140 |
JSON | 21 | 0 | 0 | 1,455 |
Markdown | 25 | 296 | 0 | 651 |
XML | 1 | 0 | 0 | 12 |
YAML | 2 | 2 | 0 | 5 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 5.32 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 1.78 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 24 | |
Interfaces | 7 | |
Traits | 1 | |
Classes | 57 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 57 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 432 | |
▷ Static methods | 52 | 12.04% |
▷ Public methods | 395 | 91.44% |
▷ Protected methods | 1 | 0.23% |
▷ Private methods | 36 | 8.33% |
Functions | 147 | |
▷ Named functions | 128 | 87.07% |
▷ Anonymous functions | 19 | 12.93% |
Constants | 20 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 20 | 100.00% |
▷ Public constants | 20 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
9 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
(invalid) vendor/waughj/wp-theme-picture/tests/img/favicon.png | 0.00KB | 0.00KB | 0.00% |
(invalid) vendor/waughj/html-picture/tests/somegone-480x320.png | 0.00KB | 0.00KB | 0.00% |
(invalid) vendor/waughj/wp-upload-image/tests/2018/12/demo.png | 0.00KB | 0.00KB | 0.00% |
(invalid) vendor/waughj/wp-theme-picture/favicon.png | 0.00KB | 0.00KB | 0.00% |
(invalid) vendor/waughj/wp-theme-image/tests/img/favicon.png | 0.00KB | 0.00KB | 0.00% |