93% contact-form-if

Code Review | Contact Form IF

WordPress plugin Contact Form IF scored 93% from 54 tests.

About plugin

  • Plugin page: contact-form-if
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.8.1
  • WordPress version: 5.8.1
  • First release: Sep 1, 2021
  • Latest release: Oct 24, 2021
  • Number of updates: 3
  • Update frequency: every 17.7 days
  • Top authors: skplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 80 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼142.30ms] Passed 4 tests

A check of server-side resources used by Contact Form IF
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1232.44 ▲6.38
Dashboard /wp-admin3.06 ▲0.0145.63 ▼12.32
Posts /wp-admin/edit.php3.12 ▲0.0146.84 ▲0.63
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.76 ▼556.61
Media Library /wp-admin/upload.php3.01 ▲0.0031.30 ▼0.91

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form IF
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.77 ▼0.218.42 ▼2.8950.55 ▼5.15
Dashboard /wp-admin2,967 ▲376.05 ▲0.08141.04 ▼23.73116.53 ▲3.26
Posts /wp-admin/edit.php2,736 ▼32.69 ▼0.0168.00 ▼2.2094.91 ▲3.01
Add New Post /wp-admin/post-new.php1,683 ▼018.52 ▲2.36391.44 ▼7.01114.03 ▲7.48
Media Library /wp-admin/upload.php1,807 ▼35.06 ▲0.05162.70 ▼2.31120.67 ▲2.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 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 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/contact-form-if/contact-form-if.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (screenshot-1.png) image missing
The official readme.txt might help

contact-form-if/contact-form-if.php 85% from 13 tests

"Contact Form IF" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("//")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin215 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.77
Average class complexity69.00
▷ Minimum class complexity69.00
▷ Maximum class complexity69.00
Average method complexity8.75
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods111.11%
▷ Public methods666.67%
▷ Protected methods00.00%
▷ Private methods333.33%
▷ Named functions00.00%
▷ Anonymous functions1100.00%
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png53.58KB13.98KB▼ 73.90%