89% js-contact-form

Code Review | Js Contact Form

WordPress plugin Js Contact Form scored89%from 54 tests.

About plugin

  • Plugin page: js-contact-form
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2012
  • Latest release: Apr 10, 2016
  • Number of updates: 36
  • Update frequency: every 40.7 days
  • Top authors: ahrana (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /9,072 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.21ms] Passed 4 tests

Server-side resources used by Js Contact Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.02 ▼1.30
Dashboard /wp-admin3.32 ▲0.0250.02 ▲0.11
Posts /wp-admin/edit.php3.38 ▲0.0243.52 ▼2.95
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.30 ▼16.70
Media Library /wp-admin/upload.php3.25 ▲0.0236.81 ▲0.91

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Js Contact Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲7013.62 ▼1.131.71 ▼0.1243.16 ▼2.35
Dashboard /wp-admin2,203 ▲115.77 ▲0.83113.41 ▲0.9641.64 ▼0.38
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0535.77 ▲1.3534.24 ▲0.54
Add New Post /wp-admin/post-new.php1,533 ▲1922.93 ▲5.40672.02 ▲51.2748.74 ▼6.79
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0492.80 ▼8.3944.49 ▲0.56

Uninstaller [IO: ▲0.00MB] [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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 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 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add images for these screenshots: #1 (Js Contact Form Example), #2 (Live Example, King Solomon Hotel, London)
Please take inspiration from this readme.txt

js-contact-form/Js Contact Form.php 85% from 13 tests

"Js Contact Form" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 292 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("js-contact-form.php" instead of "Js Contact Form.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin110 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1441292
CSS12018

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png22.62KB6.21KB▼ 72.56%
(invalid) screenshot-2.png21.45KB0.00KB▼ 100.00%