84% contact-form-block

Code Review | Contact Form Block

WordPress plugin Contact Form Block scored84%from 54 tests.

About plugin

  • Plugin page: contact-form-block
  • Plugin version: 0.3.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 28, 2019
  • Latest release: Nov 15, 2023
  • Number of updates: 71
  • Update frequency: every 22.6 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

700+ active /15,639 total downloads

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
Installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼4.74ms] Passed 4 tests

A check of server-side resources used by Contact Form Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1738.47 ▼2.44
Dashboard /wp-admin3.57 ▲0.2249.27 ▼12.61
Posts /wp-admin/edit.php3.62 ▲0.2650.11 ▲3.87
Add New Post /wp-admin/post-new.php6.08 ▲0.2085.97 ▼7.76
Media Library /wp-admin/upload.php3.43 ▲0.2037.11 ▲4.13
Dashboard /wp-admin/admin.php?page=meowapps-main-menu3.6054.53
Contact Form /wp-admin/admin.php?page=mcfb_settings-menu3.4035.49

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9613.21 ▼0.951.50 ▼0.1838.77 ▼4.90
Dashboard /wp-admin2,248 ▲675.58 ▼0.0990.16 ▼12.9440.39 ▼0.92
Posts /wp-admin/edit.php2,153 ▲532.03 ▲0.0840.79 ▲3.3635.81 ▲3.33
Add New Post /wp-admin/post-new.php6,413 ▲4,88727.66 ▲4.41943.76 ▲284.5971.13 ▲9.24
Media Library /wp-admin/upload.php1,453 ▲564.21 ▲0.0198.94 ▲2.4940.99 ▼2.48
Dashboard /wp-admin/admin.php?page=meowapps-main-menu5,2112.4957.1661.91
Contact Form /wp-admin/admin.php?page=mcfb_settings-menu9654.1874.5936.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/contact-form-block/classes/addons/human_check.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MeowCommon_Admin' not found in wp-content/plugins/contact-form-block/classes/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/contact-form-block/contact-form-block.php:26
    • > PHP Warning
      Use of undefined constant MCFB_PATH - assumed 'MCFB_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/contact-form-block/classes/init.php on line 28
    • > PHP Fatal error
      require_once(): Failed opening required 'MCFB_PATH/common/helpers.php' (include_path='.:/usr/share/php') in wp-content/plugins/contact-form-block/classes/init.php on line 28
    • > PHP Warning
      require_once(MCFB_PATH/common/helpers.php): failed to open stream: No such file or directory in wp-content/plugins/contact-form-block/classes/init.php on line 28

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt might help

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

The entry point to "Contact Form Block" version 0.3.4 is a PHP file that has certain tags in its header comment area
35 characters long description:
An easy, ultra-simple contact form.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected7,405 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
JSON2004,738
PHP162291311,347
JavaScript15182491,048
LESS1351143
PO File12727128
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.46
▷ Minimum class complexity3.00
▷ Maximum class complexity31.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods85
▷ Static methods1618.82%
▷ Public methods8498.82%
▷ Protected methods00.00%
▷ Private methods11.18%
Functions11
▷ Named functions218.18%
▷ Anonymous functions981.82%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin