Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼0.10MB] [CPU: ▼9.76ms] Passed 4 tests
Server-side resources used by YAY Images
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.03 | 35.33 ▼3.76 |
Dashboard /wp-admin | 3.32 ▲0.02 | 45.22 ▼4.30 |
Posts /wp-admin/edit.php | 3.37 ▲0.02 | 49.24 ▼2.72 |
Add New Post /wp-admin/post-new.php | 5.45 ▼0.43 | 69.52 ▼28.25 |
Media Library /wp-admin/upload.php | 3.24 ▲0.02 | 34.31 ▲0.87 |
Yay Images /wp-admin/options-general.php?page=YayimagesPlugin | 3.24 | 34.55 |
Server storage [IO: ▲0.66MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 58 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_recent-posts |
YayimagesPlugin_apiAppToken_e6d48dcd6a531191255a14beb5bdf80a |
db_upgraded |
theysaidso_admin_options |
YayimagesPlugin_freeImagesCounter |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
YAY Images: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,915 ▲180 | 13.66 ▼0.87 | 7.13 ▲5.62 | 37.57 ▼4.48 |
Dashboard /wp-admin | 2,210 ▲22 | 5.79 ▼0.06 | 101.02 ▼3.33 | 40.07 ▼4.65 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.00 ▼0.03 | 39.96 ▼0.42 | 36.09 ▼1.15 |
Add New Post /wp-admin/post-new.php | 1,555 ▲36 | 23.34 ▲0.16 | 648.46 ▲31.72 | 37.10 ▼11.22 |
Media Library /wp-admin/upload.php | 1,392 ▲1 | 4.27 ▲0.09 | 91.69 ▼10.40 | 40.27 ▼3.98 |
Yay Images /wp-admin/options-general.php?page=YayimagesPlugin | 847 | 2.07 | 26.76 | 25.71 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 8 options in the database
- can_compress_scripts
- YayimagesPlugin_apiAppToken_e6d48dcd6a531191255a14beb5bdf80a
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- YayimagesPlugin_freeImagesCounter
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
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
- 4× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/yay-images/views/partials/photonavi.php
- > /wp-content/plugins/yay-images/views/partials/photographerimages.php
- > /wp-content/plugins/yay-images/views/partials/similarimages.php
- > /wp-content/plugins/yay-images/views/photodetailskeywords.php
- 40× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/yay-images/yayimages.php:17
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/yay-images/views/partials/photographerimages.php on line 21
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/yay-images/views/photodetailskeywords.php on line 1
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/yay-images/views/partials/similarimages.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/yay-images/views/partials/help.php:3
- > PHP Notice
Undefined variable: data in wp-content/plugins/yay-images/views/partials/similarimages.php on line 17
- > PHP Notice
Undefined variable: data in wp-content/plugins/yay-images/views/photodetailskeywords.php on line 1
- > PHP Notice
Undefined variable: data in wp-content/plugins/yay-images/views/partials/photographerimages.php on line 22
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/yay-images/views/photodetails.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/yay-images/views/photodetailsadditional.php:7
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
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
Attributes that need to be fixed:
- Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
yay-images/yayimages.php 92% from 13 tests
The principal PHP file in "YAY Images" v. 1.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("yay-images.php" instead of "yayimages.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected5,797 lines of code in 37 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
Sass | 7 | 765 | 90 | 2,860 |
JavaScript | 6 | 177 | 28 | 1,537 |
PHP | 20 | 272 | 70 | 1,239 |
CSS | 2 | 27 | 3 | 129 |
JSON | 1 | 0 | 0 | 29 |
Markdown | 1 | 1 | 0 | 3 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.21 |
Average class complexity | 14.50 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 33.00 |
Average method complexity | 1.95 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 28.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 57 | |
▷ Static methods | 5 | 8.77% |
▷ Public methods | 46 | 80.70% |
▷ Protected methods | 6 | 10.53% |
▷ Private methods | 5 | 8.77% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 2 | 40.00% |
▷ Class constants | 3 | 60.00% |
▷ Public constants | 3 | 100.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
17 PNG files occupy 0.31MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/yay-minilogo.png | 2.66KB | 0.84KB | ▼ 68.31% |
images/w-t-bg.png | 0.13KB | 0.09KB | ▼ 25.78% |
images/bg-noise.png | 5.59KB | 3.06KB | ▼ 45.31% |
images/arrows.png | 0.24KB | 0.24KB | 0.00% |
images/check-icons.png | 1.17KB | 0.77KB | ▼ 34.20% |