Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.85MB] [CPU: ▲0.38ms] Passed 4 tests
A check of server-side resources used by AnsPress - Question and answer
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.31 ▲0.85 | 44.94 ▲1.27 |
Dashboard /wp-admin | 4.20 ▲0.89 | 52.64 ▲2.34 |
Posts /wp-admin/edit.php | 4.26 ▲0.90 | 50.13 ▲2.58 |
Add New Post /wp-admin/post-new.php | 6.74 ▲0.85 | 88.20 ▼4.68 |
Media Library /wp-admin/upload.php | 4.05 ▲0.82 | 42.19 ▲8.69 |
AnsPress /wp-admin/admin.php?page=anspress | 4.15 | 48.57 |
All Answers /wp-admin/edit.php?post_type=answer | 4.21 | 44.52 |
Settings /wp-admin/admin.php?page=anspress_options | 4.14 | 48.13 |
Question Categories /wp-admin/edit-tags.php?taxonomy=question_category | 4.07 | 42.36 |
New Question /wp-admin/post-new.php?post_type=question | 4.32 | 77.09 |
All Questions /wp-admin/edit.php?post_type=question | 4.21 | 58.14 |
New Answer /wp-admin/admin.php?page=ap_select_question | 4.08 | 42.31 |
Server storage [IO: ▲5.68MB] [DB: ▲0.02MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 331 new files
Database: 7 new tables, 17 new options
New tables |
---|
wp_ap_reputations |
wp_ap_reputation_events |
wp_ap_qameta |
wp_ap_subscribers |
wp_ap_views |
wp_ap_activity |
wp_ap_votes |
New WordPress options |
---|
anspress_addons |
ap_categories_path |
anspress_opt |
widget_ap_questions_widget |
widget_ap_search_widget |
widget_anspress_category_widget |
widget_recent-comments |
widget_theysaidso_widget |
widget_ap_breadcrumbs_widget |
widget_ap_askform_widget |
... |
Browser metrics Passed 4 tests
AnsPress - Question and answer: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,874 ▲139 | 13.20 ▼1.39 | 1.85 ▼0.46 | 41.94 ▼2.27 |
Dashboard /wp-admin | 2,269 ▲84 | 4.97 ▼0.93 | 100.17 ▼19.04 | 83.46 ▲35.01 |
Posts /wp-admin/edit.php | 2,144 ▲55 | 2.24 ▲0.24 | 33.53 ▼5.41 | 32.35 ▼0.16 |
Add New Post /wp-admin/post-new.php | 1,714 ▲181 | 22.62 ▼0.56 | 734.15 ▲59.76 | 56.18 ▲5.27 |
Media Library /wp-admin/upload.php | 1,437 ▲49 | 4.34 ▲0.10 | 98.94 ▼1.90 | 72.18 ▲29.86 |
AnsPress /wp-admin/admin.php?page=anspress | 1,395 | 3.95 | 77.23 | 105.33 |
All Answers /wp-admin/edit.php?post_type=answer | 1,405 | 3.76 | 65.61 | 74.47 |
Settings /wp-admin/admin.php?page=anspress_options | 1,710 | 3.55 | 51.88 | 81.18 |
Question Categories /wp-admin/edit-tags.php?taxonomy=question_category | 1,694 | 3.96 | 60.62 | 82.51 |
New Question /wp-admin/post-new.php?post_type=question | 2,922 | 7.92 | 179.56 | 143.24 |
All Questions /wp-admin/edit.php?post_type=question | 1,472 | 3.65 | 51.50 | 89.83 |
New Answer /wp-admin/admin.php?page=ap_select_question | 1,065 | 3.36 | 44.68 | 69.97 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- The plugin did not uninstall successfully, leaving 7 tables in the database
- wp_ap_qameta
- wp_ap_subscribers
- wp_ap_reputation_events
- wp_ap_views
- wp_ap_votes
- wp_ap_reputations
- wp_ap_activity
- Zombie WordPress options detected upon uninstall: 17 options
- widget_ap_leaderboard_widget
- anspress_opt
- widget_recent-posts
- widget_ap_questions_widget
- widget_ap_askform_widget
- can_compress_scripts
- widget_anspress_category_widget
- widget_ap_stats_widget
- widget_theysaidso_widget
- anspress_db_version
- ...
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test
SRP 50% 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
Please fix the following
- 17× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/anspress-question-answer/widgets/leaderboard.php:14
- > PHP Notice
Undefined property: stdClass::$prefix in wp-content/plugins/anspress-question-answer/includes/functions.php on line 1108
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/anspress-question-answer/includes/functions.php on line 1104
- > PHP Notice
Undefined property: stdClass::$prefix in wp-content/plugins/anspress-question-answer/includes/functions.php on line 1109
- > PHP Warning
Creating default object from empty value in wp-content/plugins/anspress-question-answer/includes/functions.php on line 1104
- > PHP Fatal error
Uncaught Error: Class 'AP_License' not found in wp-content/plugins/anspress-question-answer/admin/views/licenses.php:11
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/anspress-question-answer/.devcontainer/wp-settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/anspress-question-answer/.devcontainer/wp-config.php on line 105
- > PHP Notice
Undefined property: stdClass::$prefix in wp-content/plugins/anspress-question-answer/includes/functions.php on line 1107
- > PHP Fatal error
Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/anspress-question-answer/addons/recaptcha/recaptcha/ReCaptcha/RequestMethod/CurlPost.php:44
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/anspress-question-answer/addons/categories/widget.php:20
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: quora, profile, stackoverflow, answer, qa...
anspress-question-answer/anspress-question-answer.php Passed 13 tests
The main PHP file in "AnsPress - Question and answer" ver. 4.3.2 adds more information about the plugin and also serves as the entry point for this plugin
67 characters long description:
The most advance community question and answer system for WordPress
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin37,710 lines of code in 288 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 160 | 5,585 | 13,135 | 22,709 |
Sass | 34 | 315 | 57 | 6,625 |
CSS | 25 | 26 | 274 | 3,536 |
JavaScript | 50 | 525 | 711 | 3,272 |
SVG | 13 | 0 | 11 | 1,379 |
JSON | 2 | 0 | 0 | 75 |
YAML | 1 | 2 | 0 | 35 |
HTML | 1 | 1 | 0 | 33 |
Bourne Shell | 1 | 9 | 13 | 31 |
Markdown | 1 | 6 | 0 | 15 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 19.97 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 97.00 |
Average method complexity | 3.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 29.00 |
Code structure | ||
---|---|---|
Namespaces | 13 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 94 | |
▷ Abstract classes | 4 | 4.26% |
▷ Concrete classes | 90 | 95.74% |
▷ Final classes | 0 | 0.00% |
Methods | 901 | |
▷ Static methods | 270 | 29.97% |
▷ Public methods | 787 | 87.35% |
▷ Protected methods | 74 | 8.21% |
▷ Private methods | 40 | 4.44% |
Functions | 356 | |
▷ Named functions | 353 | 99.16% |
▷ Anonymous functions | 3 | 0.84% |
Constants | 25 | |
▷ Global constants | 15 | 60.00% |
▷ Class constants | 10 | 40.00% |
▷ Public constants | 10 | 100.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
15 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
addons/akismet/image.png | 5.36KB | 4.47KB | ▼ 16.60% |
addons/buddypress/image.png | 4.23KB | 3.30KB | ▼ 21.89% |
assets/question.png | 3.04KB | 0.63KB | ▼ 79.40% |
addons/avatar/image.png | 6.35KB | 5.43KB | ▼ 14.50% |
addons/notifications/image.png | 2.99KB | 2.09KB | ▼ 30.16% |