84% simpleform

Code Review | SimpleForm – Contact form made simple

WordPress plugin SimpleForm – Contact form made simple scored 84% from 54 tests.

About plugin

  • Plugin page: simpleform
  • Plugin version: 2.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 5.9.2
  • First release: Dec 1, 2019
  • Latest release: Apr 1, 2022
  • Number of updates: 50
  • Update frequency: every 17.8 days
  • Top authors: simpleform (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active / 11,827 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.13MB] [CPU: ▼298.60ms] Passed 4 tests

A check of server-side resources used by SimpleForm – Contact form made simple
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2072.11 ▲5.45
Dashboard /wp-admin3.57 ▲0.1539.02 ▼1.87
Posts /wp-admin/edit.php3.79 ▲0.1440.96 ▼10.61
Add New Post /wp-admin/post-new.php7.03 ▲0.06104.76 ▼1,185.14
Media Library /wp-admin/upload.php3.45 ▲0.1539.11 ▲3.22
Editor /wp-admin/admin.php?page=sform-editor3.9536.66
Form /wp-admin/admin.php?page=sform-form3.7035.02
Forms /wp-admin/admin.php?page=sform-forms3.4634.80
Entries /wp-admin/admin.php?page=sform-entries3.6431.43
Settings /wp-admin/admin.php?page=sform-settings4.3833.99
Add New /wp-admin/admin.php?page=sform-new3.6827.96
Support /wp-admin/admin.php?page=sform-support3.4728.28

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 51 new files
Database: 2 new tables, 4 new options
New tables
wp_sform_shortcodes
wp_sform_submissions
New WordPress options
widget_sform_widget
sform_settings
sform_attributes
sform_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for SimpleForm – Contact form made simple
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,905 ▲15715.98 ▲0.4510.49 ▲2.873.88 ▲0.05
Dashboard /wp-admin3,002 ▲836.41 ▲0.02174.92 ▼27.29192.23 ▼23.77
Posts /wp-admin/edit.php2,762 ▲443.44 ▲0.0184.95 ▲2.89169.93 ▼31.09
Add New Post /wp-admin/post-new.php1,703 ▲1717.21 ▼1.52696.44 ▼22.55209.52 ▼35.49
Media Library /wp-admin/upload.php1,774 ▲445.65 ▼0.08187.59 ▼39.08256.99 ▼39.82
Editor /wp-admin/admin.php?page=sform-editor2,3162.9371.38172.60
Form /wp-admin/admin.php?page=sform-form1,2602.7373.84202.84
Forms /wp-admin/admin.php?page=sform-forms1,4472.8969.59140.16
Entries /wp-admin/admin.php?page=sform-entries1,1062.7374.33185.64
Settings /wp-admin/admin.php?page=sform-settings2,6122.9474.46168.83
Add New /wp-admin/admin.php?page=sform-new2,3072.9273.43189.75
Support /wp-admin/admin.php?page=sform-support1,1002.7066.96148.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5768
    wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simpleform/admin/class-widget.php:10

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 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
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

simpleform/simpleform.php Passed 13 tests

"SimpleForm – Contact form made simple" version 2.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
124 characters long description:
Create a basic contact form for your website. Lightweight and very simple to manage, SimpleForm is immediately ready to use.

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected8,043 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP231,4579136,036
JavaScript79641,089
CSS53833777
JSON100141

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 286)
Cyclomatic complexity
Average complexity per logical line of code0.80
Average class complexity174.40
▷ Minimum class complexity4.00
▷ Maximum class complexity625.00
Average method complexity17.51
▷ Minimum method complexity1.00
▷ Maximum method complexity286.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods105
▷ Static methods1110.48%
▷ Public methods10095.24%
▷ Protected methods00.00%
▷ Private methods54.76%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/block/img/simpleform-icon.png2.58KB2.74KB0.00%
admin/block/build/images/transparent.a72c9a18.png0.15KB0.10KB▼ 34.87%
admin/block/img/transparent.png0.10KB0.10KB0.00%
public/img/confirmation.png3.12KB2.92KB▼ 6.42%
admin/img/copy_icon.png0.44KB0.46KB0.00%