89% simple-contact-us-form-widget

Code Review | Simple Contact Us Form Widget

WordPress plugin Simple Contact Us Form Widget scored89%from 54 tests.

About plugin

  • Plugin page: simple-contact-us...
  • Plugin version: 2.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-6.2.1
  • WordPress version: 6.3.1
  • First release: Dec 2, 2019
  • Latest release: May 17, 2023
  • Number of updates: 48
  • Update frequency: every 26.4 days
  • Top authors: gregorybialowas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,063 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.18ms] Passed 4 tests

Server-side resources used by Simple Contact Us Form Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1138.52 ▼0.97
Dashboard /wp-admin3.41 ▲0.1148.75 ▼2.62
Posts /wp-admin/edit.php3.52 ▲0.1748.13 ▼4.90
Add New Post /wp-admin/post-new.php5.99 ▲0.1083.05 ▼12.23
Media Library /wp-admin/upload.php3.33 ▲0.1038.68 ▼0.26

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
gb_simple_contact_us_widget__version
db_upgraded
widget_gb_simple_contact_us_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Contact Us Form Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11613.79 ▼0.499.33 ▲7.4840.84 ▼5.56
Dashboard /wp-admin2,197 ▲205.49 ▼0.1688.01 ▼6.7036.47 ▼5.00
Posts /wp-admin/edit.php2,102 ▲22.02 ▼0.0039.43 ▲0.8837.37 ▲3.29
Add New Post /wp-admin/post-new.php1,527 ▼122.77 ▼0.23588.21 ▼98.1054.30 ▼23.77
Media Library /wp-admin/upload.php1,402 ▼14.17 ▼0.0496.53 ▼6.3042.58 ▼7.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: widget, form, contact-us

simple-contact-us-form-widget/simple-contact-us-widget.php 85% from 13 tests

The primary PHP file in "Simple Contact Us Form Widget" version 2.2.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-contact-us-form-widget.php" instead of "simple-contact-us-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected789 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP496165326
CSS212219
PO File13773108
Markdown249059
HTML12110656
JavaScript14021

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity71.00
▷ Minimum class complexity71.00
▷ Maximum class complexity71.00
Average method complexity4.89
▷ 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 methods1583.33%
▷ Public methods1794.44%
▷ Protected methods00.00%
▷ Private methods15.56%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/colors-red.png16.83KB7.38KB▼ 56.17%
assets/img/colors-black.png14.26KB6.56KB▼ 54.00%
assets/img/colors-blue.png16.86KB7.17KB▼ 57.48%
assets/img/colors-white.png12.35KB5.36KB▼ 56.63%
assets/img/colors-green.png16.72KB6.98KB▼ 58.24%