Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▲0.04MB] [CPU: ▼6.24ms] Passed 4 tests
A check of server-side resources used by Lab404 Related Posts
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 37.89 ▼3.40 |
Dashboard /wp-admin | 3.35 ▲0.04 | 47.84 ▼3.65 |
Posts /wp-admin/edit.php | 3.40 ▲0.04 | 48.44 ▼2.72 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 86.07 ▼15.18 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 38.47 ▼0.61 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options |
---|
db_upgraded |
lab404_related_posts_options |
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
lab404_related_posts_version |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Lab404 Related Posts
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,811 ▲50 | 14.17 ▼0.20 | 1.64 ▼0.05 | 41.79 ▲0.54 |
Dashboard /wp-admin | 2,218 ▲44 | 5.57 ▼0.02 | 86.73 ▼5.46 | 42.64 ▲0.08 |
Posts /wp-admin/edit.php | 2,117 ▲20 | 2.01 ▲0.06 | 36.48 ▼1.37 | 34.58 ▼4.78 |
Add New Post /wp-admin/post-new.php | 1,543 ▲17 | 23.39 ▲0.34 | 655.46 ▲8.15 | 51.84 ▲2.66 |
Media Library /wp-admin/upload.php | 1,414 ▲11 | 4.21 ▲0.09 | 98.21 ▲4.69 | 41.48 ▲0.60 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 8 options
- widget_recent-comments
- lab404_related_posts_version
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
- lab404_related_posts_options
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
- 4× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/lab404-related-posts/templates/list_tpl.php
- > /wp-content/plugins/lab404-related-posts/templates/pro_version_tpl.php
- > /wp-content/plugins/lab404-related-posts/templates/instructions_tpl.php
- > /wp-content/plugins/lab404-related-posts/templates/boxes_tpl.php
- 6× PHP files trigger errors when accessed directly with GET requests:
- > PHP Notice
Undefined variable: cat_posts in wp-content/plugins/lab404-related-posts/templates/list_tpl.php on line 3
- > PHP Notice
Undefined variable: related_posts_title in wp-content/plugins/lab404-related-posts/templates/boxes_tpl.php on line 1
- > PHP Notice
Undefined variable: cat_posts in wp-content/plugins/lab404-related-posts/templates/boxes_tpl.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/lab404-related-posts/templates/admin_home_tpl.php:9
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/lab404-related-posts/templates/boxes_tpl.php on line 3
- > PHP Notice
Undefined variable: related_posts_title in wp-content/plugins/lab404-related-posts/templates/list_tpl.php on line 1
- > PHP Notice
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 on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
- Tags: You are using too many tags: 14 tag instead of maximum 10
lab404-related-posts/index.php 92% from 13 tests
The main PHP script in "Lab404 Related Posts" version 1.1 is automatically included on every request by WordPress
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lab404-related-posts.php" instead of "index.php")
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
There were no executable files found in this plugin662 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 7 | 94 | 82 | 468 |
CSS | 2 | 3 | 2 | 181 |
JavaScript | 1 | 2 | 0 | 13 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 28.00 |
▷ Minimum class complexity | 23.00 |
▷ Maximum class complexity | 33.00 |
Average method complexity | 3.84 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 16.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 | 19 | |
▷ Static methods | 9 | 47.37% |
▷ Public methods | 18 | 94.74% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 5.26% |
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 are no PNG files in this plugin