Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
- Install procedure validation failed for this plugin
- > Notice in wp-content/plugins/contact-bot/contactbot.php+29
Constant MCB_PLUGIN_URL already defined
Server metrics [RAM: ▼1.96MB] [CPU: ▼55.79ms] Passed 4 tests
Analyzing server-side resources used by Contact Bot
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.03 ▼1.43 | 3.81 ▼36.10 |
Dashboard /wp-admin | 2.05 ▼1.26 | 6.32 ▼45.69 |
Posts /wp-admin/edit.php | 2.05 ▼1.31 | 5.89 ▼42.15 |
Add New Post /wp-admin/post-new.php | 2.05 ▼3.84 | 5.63 ▼99.20 |
Media Library /wp-admin/upload.php | 2.05 ▼1.18 | 6.01 ▼27.37 |
How to use /wp-admin/admin.php?page=mcb-documentation | 2.05 | 5.48 |
Contact Bot /wp-admin/admin.php?page=mcb-settings | 2.05 | 5.33 |
Server storage [IO: ▲2.75MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 108 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Contact Bot
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,946 ▲211 | 14.19 ▼0.08 | 8.18 ▲6.41 | 41.38 ▼3.05 |
Dashboard /wp-admin | 2,253 ▲65 | 5.32 ▲0.44 | 101.90 ▼10.97 | 42.90 ▼2.56 |
Posts /wp-admin/edit.php | 2,140 ▲48 | 2.40 ▲0.39 | 38.00 ▼3.53 | 34.29 ▼3.11 |
Add New Post /wp-admin/post-new.php | 1,553 ▲25 | 17.76 ▼0.59 | 718.31 ▲112.30 | 35.86 ▼13.94 |
Media Library /wp-admin/upload.php | 1,432 ▲41 | 4.59 ▲0.42 | 99.04 ▲2.99 | 43.59 ▲2.94 |
How to use /wp-admin/admin.php?page=mcb-documentation | 899 | 2.34 | 43.11 | 29.51 |
Contact Bot /wp-admin/admin.php?page=mcb-settings | 1,543 | 2.84 | 61.71 | 73.61 |
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
You still need to fix the following
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/contact-bot/contactbot.php+29
Constant MCB_PLUGIN_URL already defined
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=mcb-settings
- > Notice in wp-content/plugins/contact-bot/contactbot.php+29
Constant MCB_PLUGIN_URL already defined
SRP 50% 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
- 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'IClient' not found in wp-content/plugins/contact-bot/modules/providers/MCBTelegramClient.php:8
- > PHP Fatal error
Uncaught Error: Interface 'Aura\\Session\\SegmentInterface' not found in wp-content/plugins/contact-bot/php-lib/Aura.Session/src/Segment.php:18
- > PHP Fatal error
require_once(): Failed opening required 'MCB_PLUGIN_DIR/modules/providers/IClient.php' (include_path='.:/usr/share/php') in wp-content/plugins/contact-bot/modules/MCBMessenger.php on line 11
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-bot/client/client.php:22
- > PHP Warning
Use of undefined constant MCB_PLUGIN_DIR - assumed 'MCB_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/contact-bot/loader.php on line 4
- > PHP Warning
require_once(MCB_PLUGIN_DIR/models/MCBUser.php): failed to open stream: No such file or directory in wp-content/plugins/contact-bot/loader.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/contact-bot/client/output.php:18
- > PHP Fatal error
Uncaught Error: Interface 'Aura\\Session\\RandvalInterface' not found in wp-content/plugins/contact-bot/php-lib/Aura.Session/src/Randval.php:20
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/contact-bot/contactbot.php:18
- > PHP Fatal error
Uncaught Error: Class 'MCBUtils' not found in wp-content/plugins/contact-bot/admin/integrations/telegram.php:6
- > 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 83% from 29 tests
readme.txt 88% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
- Screenshots: Add an image for screenshot #1 (screenshot-3.jpg)
- Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
contact-bot/contactbot.php 77% from 13 tests
Analyzing the main PHP file in "Contact Bot" version 1.5
The following require your attention:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: It is recommended to name the main PHP file as the plugin slug ("contact-bot.php" instead of "contactbot.php")
- 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 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin12,424 lines of code in 86 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 6 | 738 | 48 | 4,619 |
JavaScript | 18 | 542 | 766 | 2,055 |
Sass | 16 | 68 | 36 | 1,789 |
LESS | 14 | 34 | 44 | 1,628 |
PHP | 30 | 428 | 1,255 | 1,628 |
SVG | 1 | 0 | 0 | 685 |
Markdown | 1 | 7 | 0 | 20 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 5.55 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 28.00 |
Average method complexity | 1.84 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 17 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 17 | 100.00% |
▷ Final classes | 4 | 23.53% |
Methods | 107 | |
▷ Static methods | 15 | 14.02% |
▷ Public methods | 94 | 87.85% |
▷ Protected methods | 5 | 4.67% |
▷ Private methods | 8 | 7.48% |
Functions | 27 | |
▷ Named functions | 22 | 81.48% |
▷ Anonymous functions | 5 | 18.52% |
Constants | 22 | |
▷ Global constants | 13 | 59.09% |
▷ Class constants | 9 | 40.91% |
▷ Public constants | 9 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.57MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/mcb-doc-2.png | 44.54KB | 7.57KB | ▼ 83.00% |
images/mcb-doc-1.png | 92.24KB | 23.21KB | ▼ 74.84% |
images/telegram-instructions-3.png | 90.89KB | 29.46KB | ▼ 67.59% |
images/telegram-instructions-2.png | 227.28KB | 72.86KB | ▼ 67.94% |
images/mcb-doc-3.png | 62.74KB | 16.26KB | ▼ 74.07% |