84% lightweight-contact-form

Code Review | Lightweight Contact Form

WordPress plugin Lightweight Contact Form scored 84% from 54 tests.

About plugin

  • Plugin page: lightweight-conta...
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: Oct 3, 2017
  • Latest release: Aug 30, 2020
  • Number of updates: 19
  • Update frequency: every 56.0 days
  • Top authors: isabel104 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

200+ active / 3,497 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
Install script ran successfully

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

This is a short check of server-side resources used by Lightweight Contact Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.42 ▼11.69
Dashboard /wp-admin3.36 ▲0.0653.71 ▼0.69
Posts /wp-admin/edit.php3.41 ▲0.0650.57 ▲2.00
Add New Post /wp-admin/post-new.php5.94 ▲0.05103.83 ▲5.20
Media Library /wp-admin/upload.php3.28 ▲0.0635.01 ▲2.21

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Lightweight Contact Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼2513.25 ▼1.001.81 ▼0.2747.12 ▲1.80
Dashboard /wp-admin2,209 ▲35.87 ▲1.01106.72 ▼4.1341.00 ▼2.74
Posts /wp-admin/edit.php2,092 ▼02.06 ▲0.0540.83 ▲5.1737.06 ▲1.69
Add New Post /wp-admin/post-new.php1,542 ▲718.42 ▼4.71608.12 ▼59.4854.69 ▼4.23
Media Library /wp-admin/upload.php1,388 ▲64.26 ▲0.1095.80 ▼10.5842.50 ▼3.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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 | 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lightweight-contact-form/contact-form.php:216

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
5 plugin tags: contact form, minimalistic, light contact form, lightweight contact form, fast contact form

lightweight-contact-form/contact-form.php 92% from 13 tests

The principal PHP file in "Lightweight Contact Form" v. 2.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lightweight-contact-form.php" instead of "contact-form.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
There were no executable files found in this plugin264 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12765264

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.43
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin