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
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲2.69MB] [CPU: ▲13.22ms] Passed 4 tests
Analyzing server-side resources used by WP Discourse
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.06 ▲1.60 | 53.76 ▲10.88 |
Dashboard /wp-admin | 6.38 ▲3.08 | 68.09 ▲22.74 |
Posts /wp-admin/edit.php | 6.43 ▲3.07 | 64.27 ▲16.93 |
Add New Post /wp-admin/post-new.php | 8.96 ▲3.08 | 99.20 ▲2.32 |
Media Library /wp-admin/upload.php | 6.24 ▲3.01 | 60.92 ▲29.23 |
Text Content /wp-admin/admin.php?page=text_content_options | 6.21 | 51.53 |
Connection /wp-admin/admin.php?page=connection_options | 6.21 | 50.91 |
DiscourseConnect /wp-admin/admin.php?page=sso_options | 6.21 | 52.18 |
Publishing /wp-admin/admin.php?page=publishing_options | 6.21 | 51.92 |
All Options /wp-admin/admin.php?page=wp_discourse_options | 6.21 | 50.14 |
Webhooks /wp-admin/admin.php?page=webhook_options | 6.21 | 50.21 |
Logs /wp-admin/admin.php?page=log_viewer | 6.21 | 49.19 |
Commenting /wp-admin/admin.php?page=commenting_options | 6.21 | 51.13 |
Server storage [IO: ▲5.09MB] [DB: ▲0.01MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 160 new files
Database: no new tables, 19 new options
New WordPress options |
---|
discourse_configurable_text |
widget_recent-posts |
discourse_webhook |
wpdc_discourse_domain |
discourse_sso_client |
db_upgraded |
discourse_configurable_text_backup |
discourse_sso_common |
discourse_connect |
discourse_sso_provider |
... |
Browser metrics Passed 4 tests
A check of browser resources used by WP Discourse
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,885 ▲139 | 14.78 ▲0.03 | 1.73 ▼0.01 | 43.11 ▼0.52 |
Dashboard /wp-admin | 2,288 ▲103 | 5.86 ▲0.03 | 99.78 ▼4.22 | 38.62 ▼0.32 |
Posts /wp-admin/edit.php | 2,172 ▲83 | 2.03 ▲0.02 | 35.75 ▼1.53 | 33.51 ▼5.02 |
Add New Post /wp-admin/post-new.php | 1,593 ▲74 | 24.12 ▲1.05 | 728.25 ▲127.32 | 38.55 ▼3.44 |
Media Library /wp-admin/upload.php | 1,484 ▲96 | 4.32 ▲0.06 | 103.00 ▲0.54 | 46.28 ▲2.06 |
Text Content /wp-admin/admin.php?page=text_content_options | 1,153 | 1.84 | 30.11 | 30.73 |
Connection /wp-admin/admin.php?page=connection_options | 1,041 | 1.84 | 30.37 | 45.16 |
DiscourseConnect /wp-admin/admin.php?page=sso_options | 971 | 2.06 | 30.30 | 31.79 |
Publishing /wp-admin/admin.php?page=publishing_options | 1,284 | 2.07 | 35.07 | 30.75 |
All Options /wp-admin/admin.php?page=wp_discourse_options | 1,038 | 1.91 | 30.26 | 33.17 |
Webhooks /wp-admin/admin.php?page=webhook_options | 1,037 | 1.93 | 30.69 | 32.00 |
Logs /wp-admin/admin.php?page=log_viewer | 947 | 1.83 | 29.33 | 27.38 |
Commenting /wp-admin/admin.php?page=commenting_options | 1,208 | 1.95 | 30.84 | 31.77 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-posts
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
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 everything seems fine, this is not 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
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/wp-discourse/tests/phpunit/bootstrap.php
- 68× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WPDiscourse\\Monolog\\Handler\ullHandler' not found in wp-content/plugins/wp-discourse/lib/logs/handlers/null-handler.php:13
- > PHP Fatal error
Uncaught Error: Class 'WPDiscourse\\Test\\UnitTest' not found in wp-content/plugins/wp-discourse/tests/phpunit/test-discourse-comment-formatter.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-discourse/blocks/comments/comments.php:55
- > PHP Fatal error
Uncaught Error: Class 'WPDiscourse\\Test\\UnitTest' not found in wp-content/plugins/wp-discourse/tests/phpunit/test-discourse-sso.php:16
- > PHP Warning
require_once(WPDISCOURSE_PATH/vendor_namespaced/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php): failed to open stream: No such file or directory in wp-content/plugins/wp-discourse/vendor_namespaced/autoload.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'Isolated\\Symfony\\Component\\Finder\\Finder' not found in wp-content/plugins/wp-discourse/scoper.inc.php:17
- > PHP Fatal error
Uncaught Error: Class 'WPDiscourse\\Monolog\\Handler\\StreamHandler' not found in wp-content/plugins/wp-discourse/lib/logs/handlers/file-handler.php:16
- > PHP Fatal error
Trait 'WPDiscourse\\Shared\\PluginUtilities' not found in wp-content/plugins/wp-discourse/admin/network-options.php on line 17
- > PHP Fatal error
Uncaught Error: Class 'WPDiscourse\\DiscourseBase' not found in wp-content/plugins/wp-discourse/lib/discourse-publish.php:18
- > PHP Fatal error
Uncaught Error: Class 'WPDiscourse\\SSOClient\\SSOClientBase' not found in wp-content/plugins/wp-discourse/lib/sso-client/client.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: comments, sso, discourse, forum
wp-discourse/wp-discourse.php 92% from 13 tests
The entry point to "WP Discourse" version 2.4.9 is a PHP file that has certain tags in its header comment area
The following require your attention:
- Domain Path: The domain path points to a folder that does not exist ("/languages")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected80,788 lines of code in 137 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 21 | 1 | 0 | 64,909 |
PHP | 91 | 2,427 | 5,967 | 12,043 |
JavaScript | 9 | 386 | 118 | 2,790 |
CSS | 4 | 94 | 10 | 485 |
Markdown | 5 | 145 | 0 | 241 |
Bourne Shell | 1 | 22 | 10 | 129 |
XML | 3 | 3 | 1 | 98 |
HTML | 2 | 0 | 0 | 92 |
SVG | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 14.82 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 114.00 |
Average method complexity | 2.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 43.00 |
Code structure | ||
---|---|---|
Namespaces | 22 | |
Interfaces | 5 | |
Traits | 7 | |
Classes | 68 | |
▷ Abstract classes | 3 | 4.41% |
▷ Concrete classes | 65 | 95.59% |
▷ Final classes | 0 | 0.00% |
Methods | 752 | |
▷ Static methods | 46 | 6.12% |
▷ Public methods | 583 | 77.53% |
▷ Protected methods | 152 | 20.21% |
▷ Private methods | 17 | 2.26% |
Functions | 31 | |
▷ Named functions | 6 | 19.35% |
▷ Anonymous functions | 25 | 80.65% |
Constants | 29 | |
▷ Global constants | 7 | 24.14% |
▷ Class constants | 22 | 75.86% |
▷ Public constants | 22 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 1.91MB with 1.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-5.png | 239.80KB | 63.75KB | ▼ 73.42% |
assets/screenshot-3.png | 238.90KB | 63.78KB | ▼ 73.30% |
blocks/comments/src/edit/avatars/b_240.png | 1.28KB | 1.37KB | 0.00% |
assets/screenshot-7.png | 176.75KB | 44.93KB | ▼ 74.58% |
assets/screenshot-2.png | 242.11KB | 67.50KB | ▼ 72.12% |