80% form-block

Code Review | Form Block

WordPress plugin Form Block scored80%from 54 tests.

About plugin

  • Plugin page: form-block
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 29, 2023
  • Latest release: Sep 25, 2023
  • Number of updates: 22
  • Update frequency: every 8.2 days
  • Top authors: epiphyt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /985 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.20MB] [CPU: ▼41.53ms] Passed 4 tests

A check of server-side resources used by Form Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.7013.02 ▼33.23
Dashboard /wp-admin2.81 ▼0.4923.12 ▼26.66
Posts /wp-admin/edit.php2.81 ▼0.5516.03 ▼34.30
Add New Post /wp-admin/post-new.php2.81 ▼3.0818.53 ▼71.94
Media Library /wp-admin/upload.php2.81 ▼0.4215.74 ▼21.42

Server storage [IO: ▲0.24MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Form Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.34 ▼0.011.74 ▼0.2444.85 ▼1.88
Dashboard /wp-admin2,192 ▲185.55 ▲0.0487.88 ▼13.2043.09 ▼6.86
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0539.08 ▼0.4234.13 ▼2.11
Add New Post /wp-admin/post-new.php15,090 ▲13,56422.95 ▼0.111,063.29 ▲377.2360.95 ▲11.53
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.06102.33 ▲9.4545.17 ▼2.28

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
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/form-block/inc/class-form-block.php+220
    strpos(): Empty needle
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 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 Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: block editor, contact, contact form, gutenberg, form

form-block/form-block.php Passed 13 tests

"Form Block" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
42 characters long description:
An extensive yet user-friendly form block.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,963 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP144308771,568
JavaScript7212162859
Markdown5980345
Sass215098
CSS53093

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity25.09
▷ Minimum class complexity2.00
▷ Maximum class complexity53.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes11100.00%
Methods75
▷ Static methods1418.67%
▷ Public methods6586.67%
▷ Protected methods00.00%
▷ Private methods1013.33%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin