Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.11MB] [CPU: ▼3.10ms] Passed 4 tests
Server-side resources used by Formality
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.12 | 41.15 ▼1.15 |
Dashboard /wp-admin | 3.41 ▲0.11 | 47.09 ▲2.69 |
Posts /wp-admin/edit.php | 3.46 ▲0.11 | 48.08 ▼5.81 |
Add New Post /wp-admin/post-new.php | 6.20 ▲0.32 | 85.27 ▼8.12 |
Media Library /wp-admin/upload.php | 3.33 ▲0.11 | 40.44 ▲7.11 |
Results /wp-admin/edit.php?post_type=formality_result | 3.41 | 48.41 |
Forms /wp-admin/edit.php?post_type=formality_form | 3.39 | 35.84 |
Server storage [IO: ▲1.02MB] [DB: ▲0.01MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 63 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
formality_welcome |
can_compress_scripts |
Browser metrics Passed 4 tests
Formality: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,829 ▲68 | 14.60 ▼0.02 | 1.72 ▼0.09 | 43.39 ▲1.13 |
Dashboard /wp-admin | 2,229 ▲54 | 5.58 ▼0.06 | 92.65 ▼6.79 | 38.30 ▼8.13 |
Posts /wp-admin/edit.php | 2,140 ▲40 | 1.98 ▼0.00 | 38.10 ▼1.20 | 33.86 ▼2.47 |
Add New Post /wp-admin/post-new.php | 6,401 ▲4,870 | 28.00 ▲4.89 | 880.68 ▲214.43 | 38.29 ▼28.94 |
Media Library /wp-admin/upload.php | 1,441 ▲38 | 4.16 ▼0.04 | 92.90 ▼5.57 | 46.55 ▲2.39 |
Results /wp-admin/edit.php?post_type=formality_result | 1,153 | 1.91 | 31.81 | 33.40 |
Forms /wp-admin/edit.php?post_type=formality_form | 1,311 | 1.95 | 33.55 | 53.43 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- The uninstall procedure has failed, leaving 7 options in the database
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- formality_welcome
- theysaidso_admin_options
- widget_theysaidso_widget
- can_compress_scripts
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
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/formality/includes/tools/download.php
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/formality/public/templates/formality-form.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/formality/public/templates/formality-notification.php:30
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: block editor, conversational, form, gutenberg, multistep...
formality/formality.php Passed 13 tests
"Formality" version 1.5.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
111 characters long description:
Forms made simple (and cute). Designless, multistep, conversational, secure, all-in-one WordPress forms plugin.
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
Good job! No executable or dangerous file extensions detected4,448 lines of code in 35 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 23 | 318 | 819 | 2,311 |
XML | 1 | 76 | 78 | 959 |
PO File | 1 | 329 | 381 | 800 |
JSON | 4 | 0 | 0 | 366 |
SVG | 1 | 0 | 0 | 7 |
JavaScript | 3 | 0 | 0 | 3 |
CSS | 2 | 0 | 2 | 2 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 30.81 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 125.00 |
Average method complexity | 4.47 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 62.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 16 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 16 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 133 | |
▷ Static methods | 2 | 1.50% |
▷ Public methods | 125 | 93.98% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 8 | 6.02% |
Functions | 15 | |
▷ Named functions | 3 | 20.00% |
▷ Anonymous functions | 12 | 80.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
13 compressed PNG files occupy 0.15MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
dist/images/admin/block-preview-text.png | 3.75KB | 3.75KB | 0.03% |
dist/images/admin/block-preview-textarea.png | 4.08KB | 4.08KB | 0.00% |
dist/images/admin/block-preview-select.png | 8.83KB | 8.83KB | 0.00% |
dist/images/admin/block-preview-multiple.png | 11.86KB | 11.86KB | 0.01% |
dist/images/admin/block-preview-widget.png | 26.76KB | 26.76KB | 0.00% |