Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
- Install procedure had errors
- > Deprecated in wp-content/plugins/widget-posts-by-category/catswidget.php+273
Function create_function() is deprecated
Server metrics [RAM: ▼1.79MB] [CPU: ▼227.48ms] Passed 4 tests
Server-side resources used by Posts By Category Widget
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.84 ▼0.99 | 5.43 ▼32.01 |
Dashboard /wp-admin | 1.86 ▼1.20 | 5.52 ▼44.32 |
Posts /wp-admin/edit.php | 1.86 ▼1.26 | 6.94 ▼51.19 |
Add New Post /wp-admin/post-new.php | 1.86 ▼3.57 | 6.22 ▼782.39 |
Media Library /wp-admin/upload.php | 1.86 ▼1.14 | 5.37 ▼30.96 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_cats-loop-widget |
Browser metrics Passed 4 tests
Posts By Category Widget: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,703 ▲66 | 15.76 ▲0.16 | 10.31 ▼1.45 | 50.14 ▼4.16 |
Dashboard /wp-admin | 2,970 ▲36 | 5.94 ▼0.36 | 149.31 ▼13.20 | 114.20 ▼2.46 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.72 ▼0.00 | 72.87 ▲6.36 | 93.22 ▲1.99 |
Add New Post /wp-admin/post-new.php | 1,615 ▼0 | 21.50 ▲0.57 | 317.24 ▼5.90 | 108.80 ▼5.96 |
Media Library /wp-admin/upload.php | 1,810 ▲3 | 5.03 ▲0.01 | 162.71 ▼4.36 | 110.92 ▼16.33 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/widget-posts-by-category/catswidget.php+273
Function create_function() is deprecated
- The uninstall procedure has failed, leaving 1 option in the database
- widget_cats-loop-widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
SRP 50% 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 trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/widget-posts-by-category/views/admin.php:7
- > PHP Fatal error
Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/widget-posts-by-category/views/template.php:2
- > PHP Notice
Undefined variable: posts in wp-content/plugins/widget-posts-by-category/views/template.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/widget-posts-by-category/catswidget.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
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
4 plugin tags: themeable, category, posts, widget
widget-posts-by-category/catswidget.php 85% from 13 tests
This is the main PHP file of "Posts By Category Widget" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("widget-posts-by-category.php" instead of "catswidget.php")
- Text Domain: The text domain name should consist of only dashes and lowercase characters
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 plugin283 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 86 | 117 | 266 |
PO File | 1 | 0 | 0 | 17 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 14.50 |
▷ Minimum class complexity | 13.00 |
▷ Maximum class complexity | 16.00 |
Average method complexity | 2.93 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 15.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 14 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 14 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
There were not PNG files found in your plugin