78% simplest-form

Code Review | Simplest Form

WordPress plugin Simplest Form scored 78% from 54 tests.

About plugin

  • Plugin page: simplest-form
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.4
  • WordPress version: 6.3.1
  • First release: Jul 24, 2017
  • Latest release: Feb 19, 2018
  • Number of updates: 47
  • Update frequency: every 4.5 days
  • Top authors: tresrl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,027 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by Simplest Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0236.38 ▼3.91
Dashboard /wp-admin3.37 ▲0.0747.69 ▼1.81
Posts /wp-admin/edit.php3.48 ▲0.1354.23 ▲10.21
Add New Post /wp-admin/post-new.php5.96 ▲0.0797.87 ▲2.22
Media Library /wp-admin/upload.php3.29 ▲0.0638.09 ▲2.71
Simplestform /wp-admin/options-general.php?page=simplestform-settings3.3233.86

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Simplest Form
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲6113.59 ▼1.051.61 ▼0.3342.54 ▼0.45
Dashboard /wp-admin2,216 ▲285.83 ▲0.9397.17 ▼17.7740.99 ▲3.25
Posts /wp-admin/edit.php2,105 ▲191.99 ▼0.1439.47 ▲3.8335.74 ▲3.37
Add New Post /wp-admin/post-new.php1,547 ▲1423.65 ▲0.26640.15 ▼43.5353.20 ▲0.39
Media Library /wp-admin/upload.php1,404 ▲164.23 ▲0.0398.64 ▼6.0241.36 ▼6.88
Simplestform /wp-admin/options-general.php?page=simplestform-settings9742.3022.2132.37

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simplest-form/views/email/email-basic-template-for-admin.php
    • > /wp-content/plugins/simplest-form/views/email/email-basic-template.php
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simplest-form/views/frontend/alert.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simplest-form/views/admin/settings-ga.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simplest-form/views/admin/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simplest-form/views/admin/settings-api.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Simplestform\\Base' not found in wp-content/plugins/simplest-form/src/Simplestform/Cron.php:15
    • > PHP Notice
      Undefined variable: alert_type in wp-content/plugins/simplest-form/views/frontend/alert-submission.php on line 5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simplest-form/views/frontend/alert-submission.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Simplestform\\Base' not found in wp-content/plugins/simplest-form/src/Simplestform/Database.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Simplestform\\Base' not found in wp-content/plugins/simplest-form/src/Simplestform/Email.php:17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simplest-form/views/frontend/basic-form.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: form, contact form

simplest-form/simplestform.php 92% from 13 tests

The principal PHP file in "Simplest Form" v. 2.0.4 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("simplest-form.php" instead of "simplestform.php")

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
Success! There were no dangerous files found in this plugin2,769 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP191,5291,6402,522
PO File193110240
CSS2007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity18.71
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods151
▷ Static methods00.00%
▷ Public methods8052.98%
▷ Protected methods2013.25%
▷ Private methods5133.77%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There are no PNG files in this plugin