78% total-simple-contact-form

Code Review | Total Simple Contact Form

WordPress plugin Total Simple Contact Form scored78%from 54 tests.

About plugin

  • Plugin page: total-simple-cont...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7.4
  • WordPress version: 6.3.1
  • First release: Apr 5, 2016
  • Latest release: Jul 5, 2016
  • Number of updates: 25
  • Update frequency: every 16.0 days
  • Top authors: zhuqing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /975 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.01ms] Passed 4 tests

Analyzing server-side resources used by Total Simple Contact Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.71 ▲1.04
Dashboard /wp-admin3.35 ▲0.0051.39 ▼16.52
Posts /wp-admin/edit.php3.40 ▲0.0450.34 ▼1.48
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.57 ▼16.68
Media Library /wp-admin/upload.php3.27 ▲0.0438.10 ▼1.34

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Total Simple Contact Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲13513.61 ▼0.975.77 ▲3.9744.19 ▲1.03
Dashboard /wp-admin2,206 ▲185.90 ▲0.95100.52 ▼6.2237.78 ▼3.63
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0034.64 ▼3.2435.20 ▲1.25
Add New Post /wp-admin/post-new.php1,358 ▼16216.74 ▼6.09579.96 ▼103.6449.39 ▼26.64
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0196.52 ▼12.4943.15 ▼3.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/total-simple-contact-form/tscf_captcha/tscf_captcha.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      imagettftext(): Could not find/open font in wp-content/plugins/total-simple-contact-form/tscf_captcha/tscf_captcha.php on line 36
    • > PHP Warning
      imagettftext(): Could not find/open font in wp-content/plugins/total-simple-contact-form/tscf_captcha/tscf_captcha.php on line 42
    • > PHP Warning
      imagettftext(): Could not find/open font in wp-content/plugins/total-simple-contact-form/tscf_captcha/tscf_captcha.php on line 40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/total-simple-contact-form/total_simple_contact_form.php:31
    • > PHP Warning
      imagettftext(): Could not find/open font in wp-content/plugins/total-simple-contact-form/tscf_captcha/tscf_captcha.php on line 34
    • > PHP Warning
      imagettftext(): Could not find/open font in wp-content/plugins/total-simple-contact-form/tscf_captcha/tscf_captcha.php on line 38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: captcha, form, contact, email, contactform

total-simple-contact-form/total_simple_contact_form.php 92% from 13 tests

The principal PHP file in "Total Simple Contact Form" v. 1.1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("total-simple-contact-form.php" instead of "total_simple_contact_form.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin354 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24739206
PO File24444140
CSS1008

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions7
▷ Named functions7100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
tscf_captcha/captcha_background.png28.89KB10.85KB▼ 62.44%