Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.15MB] [CPU: ▼3.05ms] Passed 4 tests
A check of server-side resources used by SW Contact Form
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.62 ▲0.16 | 45.51 ▲3.33 |
Dashboard /wp-admin | 3.46 ▲0.12 | 53.65 ▼16.39 |
Posts /wp-admin/edit.php | 3.58 ▲0.22 | 54.05 ▲1.58 |
Add New Post /wp-admin/post-new.php | 6.06 ▲0.18 | 99.18 ▼0.70 |
Media Library /wp-admin/upload.php | 3.39 ▲0.16 | 44.43 ▲7.85 |
SW Contact Form /wp-admin/admin.php?page=swcf-plugin-menu | 3.37 | 37.19 |
Contact Form Data Leads /wp-admin/admin.php?page=show-cn-form-leads | 3.35 | 39.34 |
Server storage [IO: ▲0.79MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: 2 new tables, 8 new options
New tables |
---|
wp_sw_formdata |
wp_sw_formfieldtbl |
New WordPress options |
---|
db_upgraded |
cn_plugin_control |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
widget_sidemenuwidget |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for SW Contact Form
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,936 ▲175 | 13.52 ▼0.72 | 9.02 ▲7.28 | 32.89 ▼10.28 |
Dashboard /wp-admin | 2,238 ▲61 | 5.72 ▲0.09 | 84.64 ▼3.18 | 80.58 ▲35.10 |
Posts /wp-admin/edit.php | 2,149 ▲52 | 2.03 ▲0.01 | 47.74 ▲12.66 | 33.74 ▼5.77 |
Add New Post /wp-admin/post-new.php | 1,558 ▲30 | 23.64 ▲0.77 | 751.07 ▲86.21 | 63.85 ▲4.36 |
Media Library /wp-admin/upload.php | 1,434 ▲34 | 4.11 ▼0.08 | 104.90 ▲8.04 | 80.87 ▲36.20 |
SW Contact Form /wp-admin/admin.php?page=swcf-plugin-menu | 1,083 | 1.69 | 29.89 | 32.69 |
Contact Form Data Leads /wp-admin/admin.php?page=show-cn-form-leads | 834 | 1.86 | 27.10 | 26.03 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- Zombie WordPress options were found after uninstall: 7 options
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- widget_sidemenuwidget
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/sw-contact-form/uninstall.php
- 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Class 'CN_DAO' not found in wp-content/plugins/sw-contact-form/admin/leads.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/sw-contact-form/constant-option.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sw-contact-form/js/frontend.js.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sw-contact-form/inc/ajax_hook_functions.php:58
- > PHP Fatal error
Uncaught Error: Class 'CN_DAO' not found in wp-content/plugins/sw-contact-form/admin/leads.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/sw-contact-form/constant-option.php:4
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sw-contact-form/admin/contact.widget.php:2
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/sw-contact-form/constant-option.php on line 3
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/sw-contact-form/constant-option.php on line 3
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
- > GET request to /wp-admin/admin.php?page=swcf-plugin-menu
- > Javascript (severe) in unknown
/wp-admin/admin.php?page=swcf-plugin-menu 196:31 Uncaught TypeError: jQuery(...).live is not a function
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=show-cn-form-leads
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/sw-contact-form/js/admin.backend.js?ver=1.0:12:22)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=show-cn-form-leads
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
- Screenshots: Screenshot #1 (Screenshots) image not found
sw-contact-form/sw-contact-form.php Passed 13 tests
"SW Contact Form" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
83 characters long description:
Easily integrate contact form anywhere in their website using shortcode and widget.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,323 lines of code in 20 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 61 | 17 | 1,006 |
SVG | 1 | 0 | 0 | 565 |
CSS | 5 | 34 | 256 | 496 |
JavaScript | 2 | 9 | 7 | 256 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.23 |
Average class complexity | 11.86 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 28.00 |
Average method complexity | 2.33 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 57 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 53 | 92.98% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 4 | 7.02% |
Functions | 16 | |
▷ Named functions | 16 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 16 | |
▷ Global constants | 16 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/wrong.png | 0.64KB | 0.72KB | 0.00% |
images/correct.png | 0.52KB | 0.52KB | 0.00% |
images/x.png | 1.04KB | 1.25KB | 0.00% |
images/cn_form_icon.png | 0.82KB | 0.62KB | ▼ 24.07% |