90% ws-contact-form

Code Review | WS Contact Form

WordPress plugin WS Contact Form scored90%from 54 tests.

About plugin

  • Plugin page: ws-contact-form
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0.0
  • WordPress version: 6.3.1
  • First release: May 17, 2016
  • Latest release: Jun 8, 2022
  • Number of updates: 17
  • Update frequency: every 130.2 days
  • Top authors: silvermuru (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,554 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.73ms] Passed 4 tests

Analyzing server-side resources used by WS Contact Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.34 ▲1.21
Dashboard /wp-admin3.36 ▲0.0151.71 ▼18.32
Posts /wp-admin/edit.php3.41 ▲0.0554.44 ▼1.37
Add New Post /wp-admin/post-new.php5.94 ▲0.0596.30 ▼6.90
Media Library /wp-admin/upload.php3.28 ▲0.0538.05 ▼0.32
WS Contact Form /wp-admin/options-general.php?page=ws-contact-form-settings3.2540.61

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WS Contact Form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲16513.38 ▼1.249.07 ▲7.0139.12 ▼3.71
Dashboard /wp-admin2,199 ▲195.55 ▼0.0585.10 ▼8.2439.14 ▼0.56
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0139.44 ▲0.1135.94 ▼2.72
Add New Post /wp-admin/post-new.php1,537 ▲1118.36 ▼5.06605.76 ▼68.3161.67 ▲10.44
Media Library /wp-admin/upload.php1,407 ▲104.17 ▼0.03102.44 ▼0.2645.06 ▼0.33
WS Contact Form /wp-admin/options-general.php?page=ws-contact-form-settings8961.9921.9828.88

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

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 errors were detected

Optimizations

Plugin configuration Passed 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
10 plugin tags: contact form, contact us, feedback form, email, contact...

ws-contact-form/ws-contact-form.php Passed 13 tests

"WS Contact Form" version 1.3.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
33 characters long description:
Simple contact form for Wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin266 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP42710179
JavaScript18070
CSS14015
Markdown1102

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected