Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▼0.55MB] [CPU: ▼204.05ms] Passed 4 tests
This is a short check of server-side resources used by Stock Market News
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.07 ▲0.23 | 31.36 ▲6.08 |
Dashboard /wp-admin | 3.11 ▲0.04 | 17.07 ▼21.40 |
Posts /wp-admin/edit.php | 3.11 ▼0.00 | 18.66 ▼20.43 |
Add New Post /wp-admin/post-new.php | 3.11 ▼2.33 | 17.39 ▼770.14 |
Media Library /wp-admin/upload.php | 3.11 ▲0.10 | 19.16 ▼4.23 |
Stock Market News /wp-admin/options-general.php?page=stockdio-news-board-settings-config | 3.11 | 16.18 |
Server storage [IO: ▲0.34MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_widget_stockdio_market_news |
Browser metrics Passed 4 tests
A check of browser resources used by Stock Market News
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,781 ▲154 | 19.92 ▲4.76 | 7.48 ▲1.17 | 89.30 ▲10.98 |
Dashboard /wp-admin | 2,986 ▲88 | 9.69 ▲3.41 | 216.39 ▲84.52 | 176.32 ▼4.08 |
Posts /wp-admin/edit.php | 2,831 ▲91 | 7.82 ▲4.58 | 113.65 ▲45.04 | 143.45 ▲0.90 |
Add New Post /wp-admin/post-new.php | 1,552 ▼2,256 | 21.82 ▲3.21 | 366.74 ▼150.49 | 169.23 ▼0.39 |
Media Library /wp-admin/upload.php | 1,824 ▲72 | 9.92 ▲4.39 | 189.80 ▲35.61 | 206.33 ▲25.36 |
Stock Market News /wp-admin/options-general.php?page=stockdio-news-board-settings-config | 1,166 | 7.97 | 104.15 | 114.84 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- Uninstall procedure validation failed for this plugin
- > Notice in wp-content/plugins/stock-market-news/stockdio_news_stockdioplugin.php+115
Trying to access array offset on value of type bool
- The uninstall procedure has failed, leaving 1 option in the database
- widget_widget_stockdio_market_news
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=stockdio-news-board-settings-config
- > Notice in wp-content/plugins/stock-market-news/stockdio_news_stockdioplugin.php+38
Trying to access array offset on value of type bool
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
Almost there! Just fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/stock-market-news/stockdio_news_activate_plugin_settings.php
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/stock-market-news/stockdio_news_overview_widget.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/stock-market-news/stockdio_news_stockdioplugin.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/stock-market-news/stockdio_news_activate_plugin_admin.php:2
- > 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)
No browser issues were found
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
Attributes that need to be fixed:
- Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
stock-market-news/stockdio_news_stockdioplugin.php 92% from 13 tests
The principal PHP file in "Stock Market News" v. 1.9.5 is loaded by WordPress automatically on each request
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("stock-market-news.php" instead of "stockdio_news_stockdioplugin.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin4,293 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 6 | 199 | 51 | 1,803 |
PHP | 5 | 201 | 104 | 1,371 |
CSS | 5 | 90 | 28 | 1,109 |
SVG | 1 | 1 | 0 | 10 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
These items need your attention
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 103)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.59 |
Average class complexity | 101.00 |
▷ Minimum class complexity | 72.00 |
▷ Maximum class complexity | 130.00 |
Average method complexity | 6.26 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 103.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 | 38 | |
▷ Static methods | 5 | 13.16% |
▷ Public methods | 38 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 18 | |
▷ Named functions | 16 | 88.89% |
▷ Anonymous functions | 2 | 11.11% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/stockdio-logo-full-dark.png | 14.07KB | 5.39KB | ▼ 61.70% |
assets/stockdio-logo-full-light.png | 11.00KB | 5.38KB | ▼ 51.07% |