Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲1.10MB] [CPU: ▼288.89ms] Passed 4 tests
An overview of server-side resources used by Posts in Sidebar
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.71 ▲1.19 | 65.06 ▲8.58 |
Dashboard /wp-admin | 4.53 ▲1.12 | 39.34 ▲3.11 |
Posts /wp-admin/edit.php | 4.77 ▲1.12 | 43.94 ▲2.79 |
Add New Post /wp-admin/post-new.php | 8.00 ▲1.03 | 96.80 ▼1,168.65 |
Media Library /wp-admin/upload.php | 4.42 ▲1.12 | 32.39 ▲7.20 |
Server storage [IO: ▲0.83MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_pis_posts_in_sidebar |
Browser metrics Passed 4 tests
Checking browser requirements for Posts in Sidebar
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,783 ▲61 | 16.21 ▲0.08 | 5.88 ▲0.17 | 2.00 ▼0.05 |
Dashboard /wp-admin | 2,890 ▲29 | 6.11 ▼0.09 | 136.91 ▼0.29 | 194.24 ▲23.43 |
Posts /wp-admin/edit.php | 2,688 ▼6 | 3.24 ▲0.01 | 68.25 ▲5.33 | 134.48 ▼7.28 |
Add New Post /wp-admin/post-new.php | 1,717 ▲56 | 21.34 ▲5.32 | 440.03 ▼17.42 | 198.77 ▼4.86 |
Media Library /wp-admin/upload.php | 1,694 ▼1 | 5.50 ▼0.04 | 154.36 ▲13.89 | 220.38 ▲12.70 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
- 9× PHP files output text when accessed directly:
- > /wp-content/plugins/posts-in-sidebar/includes/pis-core.php
- > /wp-content/plugins/posts-in-sidebar/includes/pis-functions-general.php
- > /wp-content/plugins/posts-in-sidebar/includes/pis-functions-tools.php
- > /wp-content/plugins/posts-in-sidebar/includes/pis-functions-display.php
- > /wp-content/plugins/posts-in-sidebar/includes/pis-functions-queries.php
- > /wp-content/plugins/posts-in-sidebar/includes/class-pis-posts-in-sidebar.php
- > /wp-content/plugins/posts-in-sidebar/includes/pis-widget-form-functions.php
- > /wp-content/plugins/posts-in-sidebar/uninstall.php
- > /wp-content/plugins/posts-in-sidebar/posts-in-sidebar.php
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function shortcode_exists() in wp-content/plugins/posts-in-sidebar/includes/pis-shortcode.php:22
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: query, wp_query, post, widget, sidebar
posts-in-sidebar/posts-in-sidebar.php Passed 13 tests
Analyzing the main PHP file in "Posts in Sidebar" version 4.16.3
39 characters long description:
Publish a list of posts in your sidebar
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin10,575 lines of code in 24 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 1,306 | 2,227 | 7,469 |
PO File | 5 | 852 | 2,668 | 2,065 |
Markdown | 3 | 161 | 0 | 752 |
CSS | 1 | 7 | 12 | 179 |
JavaScript | 2 | 22 | 37 | 110 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 198)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.47 |
Average class complexity | 210.00 |
▷ Minimum class complexity | 210.00 |
▷ Maximum class complexity | 210.00 |
Average method complexity | 53.25 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 198.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 | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 75 | |
▷ Named functions | 75 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 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
No PNG files were detected