Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
- This plugin did not install gracefully
- > Deprecated in wp-content/plugins/leniy-tweaks/widgets/leniy-widget-blogstat.php+7
Methods with the same name as their class will not be constructors in a future version of PHP; Leniy_Blogstat_Widget has a deprecated constructor
Server metrics [RAM: ▼1.81MB] [CPU: ▼188.25ms] Passed 4 tests
A check of server-side resources used by Leniy Tweaks
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.82 ▼1.01 | 11.31 ▼23.45 |
Dashboard /wp-admin | 1.84 ▼1.22 | 5.25 ▼43.13 |
Posts /wp-admin/edit.php | 1.84 ▼1.27 | 5.98 ▼37.31 |
Add New Post /wp-admin/post-new.php | 1.84 ▼3.59 | 6.42 ▼649.11 |
Media Library /wp-admin/upload.php | 1.84 ▼1.16 | 5.95 ▼21.70 |
Server storage [IO: ▲0.23MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 4 new options
New WordPress options |
---|
widget_leniy_widget_announce |
widget_leniy_widget_socialbox |
widget_leniy_widget_blogstat |
widget_leniy_widget_postlist |
Browser metrics Passed 4 tests
Leniy Tweaks: 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 / | 3,724 ▲128 | 15.85 ▲0.27 | 9.74 ▼0.62 | 48.60 ▲1.69 |
Dashboard /wp-admin | 2,985 ▲48 | 5.92 ▼0.03 | 132.09 ▼15.56 | 132.23 ▲16.63 |
Posts /wp-admin/edit.php | 2,776 ▲37 | 2.70 ▼0.02 | 64.58 ▼0.24 | 95.92 ▲5.42 |
Add New Post /wp-admin/post-new.php | 1,688 ▲5 | 18.91 ▲0.21 | 374.09 ▲21.46 | 106.82 ▼4.95 |
Media Library /wp-admin/upload.php | 1,769 ▼41 | 5.01 ▼0.02 | 127.86 ▼44.75 | 136.33 ▼19.85 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- Uninstall procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/leniy-tweaks/widgets/leniy-widget-blogstat.php+7
Methods with the same name as their class will not be constructors in a future version of PHP; Leniy_Blogstat_Widget has a deprecated constructor
- This plugin does not fully uninstall, leaving 4 options in the database
- widget_leniy_widget_socialbox
- widget_leniy_widget_postlist
- widget_leniy_widget_blogstat
- widget_leniy_widget_announce
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/leniy-tweaks/leniy_fixed_adminmenuwrap/main.php:10
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/leniy-tweaks/widgets/leniy-widget-socialbox.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/leniy-tweaks/leniy_replyview/main.php:30
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/leniy-tweaks/widgets/leniy-widget-announce.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/leniy-tweaks/leniy.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/leniy-tweaks/inc/leniy_admin_menu.php:23
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/leniy-tweaks/widgets/leniy-widget-blogstat.php:7
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/leniy-tweaks/widgets/leniy-widget-postlist.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/leniy-tweaks/leniy_local_avatar/main.php:30
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/leniy-tweaks/widgets/leniy-widget-blogstat.php:7
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: tweaks, stat, clean, comments, clear
leniy-tweaks/leniy.php 85% from 13 tests
This is the main PHP file of "Leniy Tweaks" version 0.6.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("leniy-tweaks.php" instead of "leniy.php")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin418 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 100 | 57 | 418 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
Average class complexity | 4.25 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 6.00 |
Average method complexity | 1.81 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.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 | 16 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 16 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 12 | |
▷ Named functions | 12 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
19 PNG files occupy 0.21MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
leniy_local_avatar/cache/d7a973c7dab26985da5f961be7b7448050.png | 2.78KB | 1.98KB | ▼ 28.70% |
widgets/socialboximg/source/136x136/email.png | 17.57KB | 4.90KB | ▼ 72.10% |
widgets/socialboximg/source/54x54/rss.png | 8.40KB | 2.32KB | ▼ 72.38% |
widgets/socialboximg/source/136x136/qqweibo.png | 10.09KB | 4.85KB | ▼ 51.93% |
widgets/socialboximg/source/136x136/sinaweibo.png | 18.37KB | 5.15KB | ▼ 71.95% |