84% form-for-contact

Code Review | Form for Contact

WordPress plugin Form for Contact scored84%from 54 tests.

About plugin

  • Plugin page: form-for-contact
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jun 6, 2015
  • Latest release: Jun 6, 2015
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: nipu.aklima (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /957 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.98ms] Passed 4 tests

An overview of server-side resources used by Form for Contact
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0145.87 ▲4.81
Dashboard /wp-admin3.36 ▼0.0350.19 ▼15.26
Posts /wp-admin/edit.php3.41 ▲0.0150.68 ▼2.82
Add New Post /wp-admin/post-new.php5.94 ▲0.0188.44 ▼17.69
Media Library /wp-admin/upload.php3.28 ▲0.0136.58 ▼0.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Form for Contact
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.24 ▼0.291.76 ▲0.1943.61 ▲0.15
Dashboard /wp-admin2,195 ▲175.55 ▼0.2691.08 ▼10.0241.76 ▼0.14
Posts /wp-admin/edit.php2,097 ▼32.16 ▲0.1635.29 ▼5.6936.49 ▼0.90
Add New Post /wp-admin/post-new.php1,526 ▼023.60 ▲0.64627.16 ▼58.9151.16 ▲5.09
Media Library /wp-admin/upload.php1,400 ▼04.12 ▼0.0696.55 ▼22.8043.78 ▼2.81

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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/form-for-contact/form-for-contact.php:67

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

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: "Not Needed to Donate"
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === form-for-contact === )
Please take inspiration from this readme.txt

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

The main PHP file in "Form for Contact" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
45 characters long description:
A Simple Contact Form for your WordPress Site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected47 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111147

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected