Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼1.95MB] [CPU: ▼57.56ms] Passed 4 tests
Server-side resources used by HK Button Contact
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.05 ▼1.42 | 9.76 ▼34.44 |
Dashboard /wp-admin | 2.07 ▼1.28 | 5.71 ▼57.03 |
Posts /wp-admin/edit.php | 2.07 ▼1.29 | 5.83 ▼43.44 |
Add New Post /wp-admin/post-new.php | 2.07 ▼3.82 | 5.61 ▼95.34 |
Media Library /wp-admin/upload.php | 2.07 ▼1.16 | 5.23 ▼30.23 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for HK Button Contact
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,842 ▲81 | 14.23 ▼0.12 | 1.94 ▼0.31 | 43.47 ▼5.45 |
Dashboard /wp-admin | 2,210 ▲33 | 5.52 ▼0.09 | 88.68 ▼6.60 | 37.84 ▼5.37 |
Posts /wp-admin/edit.php | 2,115 ▲12 | 2.02 ▼0.01 | 35.86 ▼0.15 | 32.49 ▼3.85 |
Add New Post /wp-admin/post-new.php | 1,541 ▲15 | 23.55 ▲0.48 | 692.66 ▼1.48 | 57.54 ▲2.81 |
Media Library /wp-admin/upload.php | 1,421 ▲27 | 4.17 ▼0.02 | 99.12 ▼12.30 | 41.91 ▼2.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- Uninstall procedure had uncaught errors
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the button-contact handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
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 no errors were found, this is by no means an exhaustive test
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
The following issues need your attention
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/hk-button-contact/hk-button-contact.php
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/hk-button-contact/include/class.hk-contact-button-option.php:121
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hk-button-contact/include/class.button.php:2
- > 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
4 plugin tags: button phone, button contact, button messages, button zalo
hk-button-contact/hk-button-contact.php Passed 13 tests
The main PHP script in "HK Button Contact" version 1.1 is automatically included on every request by WordPress
19 characters long description:
Show Button Contact
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
Success! There were no dangerous files found in this plugin297 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 9 | 9 | 147 |
Sass | 1 | 2 | 0 | 147 |
SVG | 2 | 0 | 0 | 2 |
CSS | 1 | 0 | 1 | 1 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 13.00 |
▷ Minimum class complexity | 13.00 |
▷ Maximum class complexity | 13.00 |
Average method complexity | 2.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 8 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 8 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/messenger.png | 6.21KB | 4.35KB | ▼ 30.04% |