Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/my-popular-posts-widget/my-popular-posts-widget.php+10
Methods with the same name as their class will not be constructors in a future version of PHP; My_Popular_Posts has a deprecated constructor
Server metrics [RAM: ▼1.71MB] [CPU: ▼47.46ms] Passed 4 tests
Server-side resources used by My Popular Posts Widget
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.28 ▼1.18 | 8.88 ▼32.06 |
Dashboard /wp-admin | 2.29 ▼1.01 | 10.59 ▼39.03 |
Posts /wp-admin/edit.php | 2.29 ▼1.06 | 11.36 ▼34.72 |
Add New Post /wp-admin/post-new.php | 2.29 ▼3.59 | 10.74 ▼84.02 |
Media Library /wp-admin/upload.php | 2.29 ▼0.94 | 11.11 ▼22.21 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_my_popula_posts |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for My Popular Posts Widget
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 13.30 ▼1.45 | 1.70 ▼0.08 | 41.75 ▼3.39 |
Dashboard /wp-admin | 2,203 ▲15 | 5.82 ▲0.93 | 105.48 ▼1.74 | 38.12 ▼4.46 |
Posts /wp-admin/edit.php | 2,092 ▲3 | 2.00 ▼0.01 | 38.96 ▲4.33 | 34.63 ▲1.03 |
Add New Post /wp-admin/post-new.php | 1,532 ▼1 | 18.57 ▼4.61 | 602.71 ▼25.25 | 59.33 ▲9.21 |
Media Library /wp-admin/upload.php | 1,391 ▲3 | 4.22 ▲0.00 | 102.06 ▲1.86 | 43.53 ▼0.11 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- Uninstall procedure validation failed for this plugin
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in My_Popular_Posts is deprecated since version 4.3.0! Use __construct() instead.
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_my_popula_posts
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
- db_upgraded
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
Even though no errors were found, 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 fix the following
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/my-popular-posts-widget/my-popular-posts-widget.php:10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: popular, popular-posts, thumbnail, post, widget
my-popular-posts-widget/my-popular-posts-widget.php Passed 13 tests
"My Popular Posts Widget" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
95 characters long description:
A very simple popular posts widget which displays posts by comment count (with featured image).
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
No dangerous file extensions were detected116 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 18 | 14 | 116 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.20 |
Average class complexity | 11.00 |
▷ Minimum class complexity | 11.00 |
▷ Maximum class complexity | 11.00 |
Average method complexity | 4.33 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 9.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 | 3 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 3 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.03MB
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 26.19KB | 24.96KB | ▼ 4.69% |