Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
- Install procedure had errors
- > Deprecated in wp-content/plugins/cf7-cpfcnpj-validations/classes/Cpf.php+91
Array and string offset access syntax with curly braces is deprecated
Server metrics [RAM: ▼1.92MB] [CPU: ▼56.80ms] Passed 4 tests
An overview of server-side resources used by Contact Form 7 CPF/CNPJ Validations
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.07 ▼1.39 | 4.89 ▼38.95 |
Dashboard /wp-admin | 2.09 ▼1.21 | 7.03 ▼47.77 |
Posts /wp-admin/edit.php | 2.09 ▼1.27 | 5.93 ▼45.53 |
Add New Post /wp-admin/post-new.php | 2.09 ▼3.80 | 5.94 ▼94.93 |
Media Library /wp-admin/upload.php | 2.09 ▼1.14 | 5.86 ▼29.71 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Contact Form 7 CPF/CNPJ Validations
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.35 ▲0.15 | 1.81 ▼0.45 | 48.13 ▲4.89 |
Dashboard /wp-admin | 2,189 ▲15 | 5.67 ▲0.09 | 87.52 ▼0.16 | 42.89 ▲2.07 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.16 ▲0.11 | 40.38 ▼1.69 | 37.15 ▲0.61 |
Add New Post /wp-admin/post-new.php | 1,526 ▼5 | 21.50 ▼1.83 | 710.80 ▲11.89 | 46.80 ▼10.27 |
Media Library /wp-admin/upload.php | 1,397 ▼6 | 4.26 ▲0.03 | 117.79 ▲14.43 | 51.76 ▲5.33 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/cf7-cpfcnpj-validations/classes/Cpf.php+91
Array and string offset access syntax with curly braces is deprecated
- Zombie WordPress options detected upon uninstall: 6 options
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 take a closer look at the following
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'AbstractValidator' not found in wp-content/plugins/cf7-cpfcnpj-validations/classes/Cpf.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/cf7-cpfcnpj-validations/contact-form-7-cpf-cnpj-validations.php:12
- > PHP Fatal error
Uncaught Error: Class 'AbstractValidator' not found in wp-content/plugins/cf7-cpfcnpj-validations/classes/Cnpj.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 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
6 plugin tags: contact, contact form, cpf, form, cpf-cnpj...
cf7-cpfcnpj-validations/contact-form-7-cpf-cnpj-validations.php 92% from 13 tests
"Contact Form 7 CPF/CNPJ Validations" version 0.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cf7-cpfcnpj-validations.php" instead of "contact-form-7-cpf-cnpj-validations.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected241 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 80 | 219 | 241 |
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.47 |
Average class complexity | 8.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 17.00 |
Average method complexity | 2.46 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 1 | 25.00% |
▷ Concrete classes | 3 | 75.00% |
▷ Final classes | 0 | 0.00% |
Methods | 27 | |
▷ Static methods | 1 | 3.70% |
▷ Public methods | 17 | 62.96% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 10 | 37.04% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 9 | |
▷ Global constants | 2 | 22.22% |
▷ Class constants | 7 | 77.78% |
▷ Public constants | 7 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin