Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲5.18MB] [CPU: ▲28.24ms] 75% from 4 tests
Analyzing server-side resources used by Comments - wpDiscuz
Please have a look at the following items
- Extra RAM: The extra memory usage must be under 5MB (currently 5.18MB on /wp-admin/admin.php?page=wpdiscuz_options_page)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.75 ▲5.29 | 66.11 ▲18.15 |
Dashboard /wp-admin | 8.45 ▲5.14 | 79.98 ▲16.42 |
Posts /wp-admin/edit.php | 8.50 ▲5.14 | 88.39 ▲38.55 |
Add New Post /wp-admin/post-new.php | 11.20 ▲5.31 | 142.47 ▲39.85 |
Media Library /wp-admin/upload.php | 8.37 ▲5.14 | 75.51 ▲41.42 |
» Addons /wp-admin/admin.php?page=wpdiscuz_addons_page | 8.36 | 69.09 |
» Forms /wp-admin/edit.php?post_type=wpdiscuz_form | 8.49 | 70.86 |
» Tools /wp-admin/admin.php?page=wpdiscuz_tools_page | 8.36 | 67.41 |
» Phrases /wp-admin/admin.php?page=wpdiscuz_phrases_page | 8.51 | 77.80 |
» Dashboard /wp-admin/admin.php?page=wpdiscuz | 8.47 | 72.41 |
» Settings /wp-admin/admin.php?page=wpdiscuz_options_page | 8.61 | 64.22 |
Server storage [IO: ▲13.88MB] [DB: ▲0.02MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 555 new files
Database: 6 new tables, 11 new options
New tables |
---|
wp_wc_users_rated |
wp_wc_comments_subscription |
wp_wc_feedback_forms |
wp_wc_follow_users |
wp_wc_phrases |
wp_wc_users_voted |
New WordPress options |
---|
widget_recent-comments |
wc_plugin_version |
wpd_admin_notices |
theysaidso_admin_options |
widget_theysaidso_widget |
wc_options |
wpdiscuz-addon-note-dismissed |
wpdiscuz_form_content_type_rel |
widget_recent-posts |
db_upgraded |
... |
Browser metrics Passed 4 tests
A check of browser resources used by Comments - wpDiscuz
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,953 ▲191 | 14.31 ▼0.04 | 1.66 ▼0.46 | 35.31 ▼9.12 |
Dashboard /wp-admin | 2,346 ▲169 | 5.60 ▼0.05 | 102.46 ▲15.74 | 85.08 ▲43.93 |
Posts /wp-admin/edit.php | 2,251 ▲151 | 2.03 ▲0.06 | 41.75 ▲4.39 | 35.17 ▼0.33 |
Add New Post /wp-admin/post-new.php | 6,551 ▲5,025 | 27.43 ▲4.45 | 885.84 ▲266.89 | 36.61 ▼15.25 |
Media Library /wp-admin/upload.php | 1,454 ▲54 | 4.28 ▲0.09 | 99.39 ▲3.60 | 45.83 ▲4.77 |
» Addons /wp-admin/admin.php?page=wpdiscuz_addons_page | 2,722 | 3.11 | 64.94 | 111.03 |
» Forms /wp-admin/edit.php?post_type=wpdiscuz_form | 1,765 | 2.53 | 41.72 | 46.88 |
» Tools /wp-admin/admin.php?page=wpdiscuz_tools_page | 1,479 | 2.35 | 36.62 | 42.99 |
» Phrases /wp-admin/admin.php?page=wpdiscuz_phrases_page | 6,910 | 16.06 | 429.96 | 105.80 |
» Dashboard /wp-admin/admin.php?page=wpdiscuz | 1,697 | 3.57 | 135.87 | 138.18 |
» Settings /wp-admin/admin.php?page=wpdiscuz_options_page | 1,137 | 2.22 | 35.16 | 38.64 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- The uninstall procedure failed, leaving 6 tables in the database
- wp_wc_follow_users
- wp_wc_users_rated
- wp_wc_feedback_forms
- wp_wc_comments_subscription
- wp_wc_users_voted
- wp_wc_phrases
- This plugin did not uninstall successfully, leaving 11 options in the database
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
- wpdiscuz_form_content_type_rel
- wc_options
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- wpdiscuz-addon-note-dismissed
- wpd_admin_notices
- ...
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
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/wpdiscuz/utils/ajax/wpdiscuz-ajax.php
- 35× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'wpdFormAttr\\Field\\Field' not found in wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Field/DefaultField/Captcha.php:10
- > PHP Fatal error
require_once(): Failed opening required 'WPDISCUZ_DIR_PATH/forms/wpdFormAttr/html/default-fields.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpdiscuz/forms/wpdFormAttr/html/admin-form-fields-list.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'wpdFormAttr\\Field\\Field' not found in wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Field/UrlField.php:7
- > PHP Fatal error
Uncaught Error: Class 'wpdFormAttr\\Field\\Field' not found in wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Field/DefaultField/Website.php:9
- > PHP Fatal error
Uncaught Error: Class 'wpdFormAttr\\Field\\Field' not found in wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Field/CheckboxField.php:5
- > PHP Fatal error
Uncaught Error: Interface 'WpDiscuzConstants' not found in wp-content/plugins/wpdiscuz/includes/class.WpdiscuzDBManager.php:3
- > PHP Fatal error
Uncaught Error: Class 'wpdFormAttr\\Field\\Field' not found in wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Field/RatingField.php:7
- > PHP Fatal error
Uncaught Error: Interface 'wpdFormAttr\\Field\\DefaultField\\ReCaptcha\\RequestMethod' not found in wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Field/DefaultField/ReCaptcha/RequestMethod/CurlPost.php:39
- > PHP Fatal error
Uncaught Error: Class 'wpdFormAttr\\Field\\Field' not found in wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Field/NumberField.php:7
- > PHP Fatal error
Uncaught Error: Class 'wpdFormAttr\\Field\\Field' not found in wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Field/TextAreaField.php:7
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
- Requires php: The plugin version is formatted incorrectly
wpdiscuz/class.WpdiscuzCore.php 92% from 13 tests
The principal PHP file in "Comments - wpDiscuz" v. 7.6.13 is loaded by WordPress automatically on each request
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("wpdiscuz.php" instead of "class.WpdiscuzCore.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected111,258 lines of code in 255 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 17 | 18,767 | 26,413 | 49,306 |
PHP | 135 | 2,369 | 2,404 | 29,926 |
JavaScript | 35 | 2,444 | 939 | 16,202 |
SVG | 5 | 0 | 12 | 10,230 |
CSS | 27 | 237 | 303 | 5,384 |
HTML | 35 | 0 | 0 | 171 |
JSON | 1 | 0 | 0 | 39 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 268)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 73.73 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 833.00 |
Average method complexity | 5.59 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 268.00 |
Code structure | ||
---|---|---|
Namespaces | 10 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 57 | |
▷ Abstract classes | 2 | 3.51% |
▷ Concrete classes | 55 | 96.49% |
▷ Final classes | 0 | 0.00% |
Methods | 960 | |
▷ Static methods | 48 | 5.00% |
▷ Public methods | 768 | 80.00% |
▷ Protected methods | 34 | 3.54% |
▷ Private methods | 158 | 16.46% |
Functions | 8 | |
▷ Named functions | 4 | 50.00% |
▷ Anonymous functions | 4 | 50.00% |
Constants | 119 | |
▷ Global constants | 3 | 2.52% |
▷ Class constants | 116 | 97.48% |
▷ Public constants | 116 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
167 PNG files occupy 2.32MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/dashboard/icon-comment-inlinepng.png | 0.30KB | 0.23KB | ▼ 22.62% |
assets/img/dashboard/inline-feedback-opened.png | 7.71KB | 8.20KB | 0.00% |
assets/img/dashboard/news/icon-layouts.png | 0.69KB | 0.59KB | ▼ 14.22% |
assets/img/social-icons/ok-18x18-orig.png | 0.75KB | 0.74KB | 0.26% |
assets/addons/user-mention/header.png | 31.04KB | 11.16KB | ▼ 64.07% |