Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.01MB] [CPU: ▼7.43ms] Passed 4 tests
Analyzing server-side resources used by Related Articles
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 33.75 ▼8.75 |
Dashboard /wp-admin | 3.31 ▼0.04 | 44.72 ▼16.09 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.24 ▼3.56 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 88.26 ▼0.39 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 32.95 ▼1.30 |
Server storage [IO: ▲1.69MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 168 new files
Database: 1 new table, 6 new options
New tables |
---|
wp_pluginSL_related_articles |
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Related Articles
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲43 | 14.25 ▼0.10 | 1.69 ▼0.13 | 35.79 ▼7.82 |
Dashboard /wp-admin | 2,195 ▲21 | 5.62 ▲0.11 | 97.06 ▼5.84 | 43.92 ▼0.18 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.99 ▲0.02 | 40.86 ▲1.43 | 34.64 ▼1.21 |
Add New Post /wp-admin/post-new.php | 1,535 ▲9 | 23.28 ▲0.02 | 650.39 ▼13.07 | 60.43 ▲12.14 |
Media Library /wp-admin/upload.php | 1,394 ▼6 | 4.18 ▲0.04 | 97.58 ▼36.39 | 39.79 ▼10.11 |
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
Please fix the following items
- This plugin cannot be uninstalled
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method related_articles::uninstall_removedata() should not be called statically
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- widget_recent-comments
- db_upgraded
- can_compress_scripts
Smoke tests 50% 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 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
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/related-articles/core.class.php
- > /wp-content/plugins/related-articles/core.php
- > /wp-content/plugins/related-articles/related-articles.php
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Warning
require_once(core.php): failed to open stream: No such file or directory in wp-content/plugins/related-articles/core/templates/my-plugin.php on line 18
- > PHP Fatal error
require_once(): Failed opening required 'core.php' (include_path='.:/usr/share/php') in wp-content/plugins/related-articles/core/templates/my-plugin.php on line 18
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 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
Please fix the following attributes:
- Screenshots: These screenshots do not have images: #1 (Configuration page), #2 (Examples), #3 (Related content is displayed in page)
related-articles/core.class.php 85% from 13 tests
"Related Articles" version %s by %s', 'SL_frame...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 ("related-articles.php" instead of "core.class.php")
- Version: The version number should be digits and periods (ex. "1.0.3" instead of "%s by %s', 'SL_frame...")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin17,383 lines of code in 75 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 37 | 4,044 | 0 | 8,877 |
PHP | 19 | 1,014 | 1,856 | 7,154 |
JavaScript | 5 | 206 | 229 | 778 |
CSS | 10 | 85 | 13 | 459 |
Markdown | 1 | 20 | 0 | 84 |
JSON | 1 | 0 | 0 | 29 |
INI | 2 | 0 | 0 | 2 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
These items need your attention
- Method cyclomatic complexity has to be reduced to less than 100 (currently 119)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 51.55 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 211.00 |
Average method complexity | 7.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 119.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 20 | |
▷ Abstract classes | 1 | 5.00% |
▷ Concrete classes | 19 | 95.00% |
▷ Final classes | 0 | 0.00% |
Methods | 165 | |
▷ Static methods | 35 | 21.21% |
▷ Public methods | 162 | 98.18% |
▷ Protected methods | 3 | 1.82% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
36 PNG files occupy 0.45MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
core/img/tab_doc.png | 0.82KB | 0.84KB | 0.00% |
core/img/tree_lastnode_plus.png | 0.14KB | 0.12KB | ▼ 14.97% |
core/img/valid.png | 4.34KB | 1.51KB | ▼ 65.32% |
img/icon-128x128.png | 9.20KB | 5.09KB | ▼ 44.72% |
core/img/arrow_down.png | 0.27KB | 0.27KB | 0.00% |