83% cf-contact-form

Code Review | CF Contact Form

WordPress plugin CF Contact Form scored 83% from 54 tests.

About plugin

  • Plugin page: cf-contact-form
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Oct 19, 2017
  • Latest release: Oct 19, 2017
  • Number of updates: 5
  • Update frequency: every 7.4 days
  • Top authors: nishs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 635 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.91ms] Passed 4 tests

A check of server-side resources used by CF Contact Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.56 ▼3.50
Dashboard /wp-admin3.32 ▲0.0143.05 ▼8.05
Posts /wp-admin/edit.php3.37 ▲0.0149.07 ▼1.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.39 ▼6.76
Media Library /wp-admin/upload.php3.24 ▲0.0137.54 ▲1.44

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for CF Contact Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.13 ▼1.511.97 ▲0.2744.46 ▼18.54
Dashboard /wp-admin2,203 ▲124.88 ▼0.02100.54 ▼6.1237.74 ▼0.38
Posts /wp-admin/edit.php2,089 ▲32.00 ▼0.0136.12 ▼0.5931.36 ▼2.73
Add New Post /wp-admin/post-new.php1,535 ▲223.10 ▼0.02641.34 ▲3.8052.35 ▼10.28
Media Library /wp-admin/upload.php1,382 ▼64.30 ▲0.1298.63 ▼13.9143.47 ▼7.40

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cf-contact-form/contactwp.php:145

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === cf-contact-form === )
  • Screenshots: These screenshots do not have images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
You can take inspiration from this readme.txt

cf-contact-form/contactwp.php 92% from 13 tests

The primary PHP file in "CF Contact Form" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cf-contact-form.php" instead of "contactwp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin68 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1621968

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin