84% cforms2

Code Review | cformsII

WordPress plugin cformsII scored 84% from 54 tests.

About plugin

  • Plugin page: cforms2
  • Plugin version: 15.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Oct 15, 2014
  • Latest release: Aug 9, 2023
  • Number of updates: 354
  • Update frequency: every 9.1 days
  • Top authors: bgermann (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

7,000+ active / 236,479 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
Install script ran successfully

Server metrics [RAM: ▲0.61MB] [CPU: ▼4.01ms] Passed 4 tests

An overview of server-side resources used by cformsII
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6141.86 ▼3.90
Dashboard /wp-admin3.95 ▲0.6547.48 ▼5.08
Posts /wp-admin/edit.php4.00 ▲0.6550.02 ▲0.55
Add New Post /wp-admin/post-new.php6.47 ▲0.59104.34 ▼7.60
Media Library /wp-admin/upload.php3.81 ▲0.5944.19 ▲7.18
Help! /wp-admin/admin.php?page=cforms2/cforms-help.php4.1138.66
Global Settings /wp-admin/admin.php?page=cforms2/cforms-global-settings.php3.8935.48
Form Settings /wp-admin/admin.php?page=cforms2/cforms-options.php4.2737.21

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 66 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
widget_cforms
cforms_settings
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for cformsII
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲20813.96 ▼0.465.71 ▲3.8138.41 ▼10.35
Dashboard /wp-admin2,235 ▲474.87 ▲0.0399.00 ▼17.0481.14 ▲34.36
Posts /wp-admin/edit.php2,124 ▲351.99 ▲0.0234.94 ▼1.6932.28 ▲0.04
Add New Post /wp-admin/post-new.php1,542 ▲1623.51 ▲0.36772.09 ▲102.9755.41 ▲2.70
Media Library /wp-admin/upload.php1,420 ▲294.17 ▼0.0192.07 ▼17.5382.39 ▲38.04
Help! /wp-admin/admin.php?page=cforms2/cforms-help.php2,8502.1941.16124.07
Global Settings /wp-admin/admin.php?page=cforms2/cforms-global-settings.php1,3852.2752.0140.25
Form Settings /wp-admin/admin.php?page=cforms2/cforms-options.php2,9642.4646.0759.16

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_cforms
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Cforms2\\Fieldtypes\\Fieldtype' not found in wp-content/plugins/cforms2/Fieldtypes/MultiId.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Cforms2\\Fieldtypes\\MultiId' not found in wp-content/plugins/cforms2/Fieldtypes/SelectBox.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cforms2_check_access_priv() in wp-content/plugins/cforms2/cforms-corrupted.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cforms2/Widget.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Cforms2\\Fieldtypes\\MultiId' not found in wp-content/plugins/cforms2/Fieldtypes/CheckBox.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cforms2/cforms-global-settings.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Cforms2\\Fieldtypes\\Fieldtype' not found in wp-content/plugins/cforms2/Fieldtypes/FieldsetStart.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Cforms2\\Fieldtypes\\MultiId' not found in wp-content/plugins/cforms2/Fieldtypes/CheckBoxGroup.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cforms2/cforms-options.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Cforms2\\Fieldtypes\\Fieldtype' not found in wp-content/plugins/cforms2/Fieldtypes/TextOnly.php:21

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: post, contact form, multi step, api exposed, form...

cforms2/cforms.php 85% from 13 tests

"cformsII" version 15.0.5'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: Keep the plugin description shorter than 140 characters (currently 153 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("cforms2.php" instead of "cforms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected10,492 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
CSS211,0357905,147
PHP291,1768754,501
JavaScript321187844

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.40
Average class complexity4.93
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes15
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes17.69%
Methods100
▷ Static methods1616.00%
▷ Public methods6262.00%
▷ Protected methods2222.00%
▷ Private methods1616.00%
Functions56
▷ Named functions5394.64%
▷ Anonymous functions35.36%
Constants3
▷ Global constants3100.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
11 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/example-multi.png4.68KB2.60KB▼ 44.37%
styling/fancy_white_inp_bg.png0.77KB0.75KB▼ 3.42%
images/cformsicon.png1.63KB0.80KB▼ 50.93%
styling/fancy_white_submit.png0.52KB0.51KB▼ 2.62%
images/example-grp.png3.83KB2.72KB▼ 29.00%