84% minimal-contact-form

Code Review | Minimal Contact Form

WordPress plugin Minimal Contact Form scored84%from 54 tests.

About plugin

  • Plugin page: minimal-contact-form
  • Plugin version: 0.10.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-6.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2018
  • Latest release: Dec 14, 2022
  • Number of updates: 26
  • Update frequency: every 62.9 days
  • Top authors: mirkoschubert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,934 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.70ms] Passed 4 tests

An overview of server-side resources used by Minimal Contact Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1048.88 ▲4.14
Dashboard /wp-admin3.40 ▲0.0650.93 ▼15.15
Posts /wp-admin/edit.php3.52 ▲0.1647.70 ▼1.11
Add New Post /wp-admin/post-new.php5.99 ▲0.0987.77 ▼8.48
Media Library /wp-admin/upload.php3.33 ▲0.0938.81 ▲1.94
Contact Form /wp-admin/options-general.php?page=minimal-contact-form3.3235.67

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
mcf_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Minimal Contact Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲15713.67 ▼0.689.55 ▲7.5541.65 ▼7.75
Dashboard /wp-admin2,202 ▲255.62 ▲0.0796.55 ▲3.2242.62 ▼1.04
Posts /wp-admin/edit.php2,104 ▲12.00 ▲0.0436.46 ▲0.2134.56 ▲0.45
Add New Post /wp-admin/post-new.php1,529 ▼1423.17 ▲0.52673.60 ▲0.3262.87 ▲2.97
Media Library /wp-admin/upload.php1,404 ▲74.19 ▼0.09103.64 ▼9.6048.10 ▲1.65
Contact Form /wp-admin/options-general.php?page=minimal-contact-form1,2472.0025.6234.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/minimal-contact-form/mcf-options-page.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: contact, form, dsgvo, simple, email...

minimal-contact-form/mcf.php 85% from 13 tests

Analyzing the main PHP file in "Minimal Contact Form" version 0.10.0
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("minimal-contact-form.php" instead of "mcf.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin1,832 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PO File63843901,120
PHP5104131408
CSS2410208
JavaScript16696

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin