84% snsimple-email

Code Review | Simple Email Form

WordPress plugin Simple Email Form scored84%from 54 tests.

About plugin

  • Plugin page: snsimple-email
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Feb 25, 2011
  • Latest release: Mar 23, 2017
  • Number of updates: 16
  • Update frequency: every 138.7 days
  • Top authors: seannewby (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /3,587 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.18ms] Passed 4 tests

Analyzing server-side resources used by Simple Email Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.20 ▼0.25
Dashboard /wp-admin3.38 ▲0.0445.02 ▼16.93
Posts /wp-admin/edit.php3.49 ▲0.1444.94 ▼4.39
Add New Post /wp-admin/post-new.php5.96 ▲0.0881.15 ▼15.13
Media Library /wp-admin/upload.php3.30 ▲0.0837.20 ▲5.32
Simple Email Form /wp-admin/options-general.php?page=simple-email-form3.2731.56

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
simple-email-form-version

Browser metrics Passed 4 tests

Simple Email Form: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.33 ▼0.931.91 ▲0.0946.31 ▼1.65
Dashboard /wp-admin2,210 ▲195.86 ▲0.99108.89 ▲0.3240.14 ▲0.08
Posts /wp-admin/edit.php2,093 ▲11.98 ▼0.0839.28 ▼1.3535.62 ▲0.11
Add New Post /wp-admin/post-new.php1,539 ▼323.30 ▲5.15666.52 ▲38.5948.75 ▼8.96
Media Library /wp-admin/upload.php1,392 ▲104.25 ▼0.0193.25 ▼7.4042.39 ▼2.47
Simple Email Form /wp-admin/options-general.php?page=simple-email-form8722.0525.9525.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • simple-email-form-version
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'simple_email_form' not found in wp-content/plugins/snsimple-email/templates/simple-email-form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/snsimple-email/simple-email-form.php:41
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/snsimple-email/simple-email-form.php on line 37

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)
No browser issues were found

Optimizations

Plugin configuration 96% 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
6 plugin tags: form, simple, email, recaptcha, contact...

snsimple-email/simple-email-form.php 92% from 13 tests

The main PHP file in "Simple Email Form" ver. 2.0.4 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("snsimple-email.php" instead of "simple-email-form.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected489 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP24073251
JavaScript4118104
PO File1282884
CSS26050

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods18100.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
There were not PNG files found in your plugin