94% super-simple-contact-form

Code Review | Super Simple Contact Form

WordPress plugin Super Simple Contact Form scored 94% from 54 tests.

About plugin

  • Plugin page: super-simple-cont...
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9.4
  • WordPress version: 5.8.1
  • First release: Jun 13, 2012
  • Latest release: Feb 9, 2018
  • Number of updates: 51
  • Update frequency: every 40.7 days
  • Top authors: bitacre (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active / 28,619 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Server-side resources used by Super Simple Contact Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1340.72 ▲14.72
Dashboard /wp-admin3.07 ▲0.0149.18 ▲3.32
Posts /wp-admin/edit.php3.12 ▲0.0151.84 ▲5.27
Add New Post /wp-admin/post-new.php5.42 ▼0.01101.07 ▼677.94
Media Library /wp-admin/upload.php3.01 ▲0.0135.93 ▼1.22

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Super Simple Contact Form: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲21115.98 ▲0.3811.45 ▼1.5349.38 ▼0.35
Dashboard /wp-admin3,051 ▲1145.93 ▲0.02143.69 ▼16.51123.65 ▲0.08
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0174.58 ▲4.8494.12 ▼9.73
Add New Post /wp-admin/post-new.php1,604 ▼7918.82 ▲0.15384.64 ▼24.83117.17 ▲0.04
Media Library /wp-admin/upload.php1,807 ▼35.02 ▼0.01161.50 ▲9.31133.67 ▲9.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-simple-contact-form/super-simple-contact-form.php:27

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 on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (The contact form.), #2 (The message when one of the requried fields (return email address or message) is omitted.)
You can look at the official readme.txt

super-simple-contact-form/super-simple-contact-form.php Passed 13 tests

The primary PHP file in "Super Simple Contact Form" version 1.6.2 is used by WordPress to initiate all plugin functionality
82 characters long description:
An absurdly simple contact form plugin. Just type [contact]. There are no options.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected175 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14961133
CSS11142

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png5.04KB4.08KB▼ 19.08%
screenshot-1.png7.69KB4.08KB▼ 46.90%