68% cforms-plugin

Code Review | cForms - Light speed fast Form Builder

WordPress plugin cForms - Light speed fast Form Builder scored68%from 54 tests.

About plugin

  • Plugin page: cforms-plugin
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-4.8
  • WordPress version: 6.3.1
  • First release: Apr 20, 2017
  • Latest release: Aug 3, 2017
  • Number of updates: 17
  • Update frequency: every 6.2 days
  • Top authors: compojoom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,547 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.11ms] Passed 4 tests

Analyzing server-side resources used by cForms - Light speed fast Form Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.88 ▼8.38
Dashboard /wp-admin3.35 ▲0.0450.44 ▼1.85
Posts /wp-admin/edit.php3.46 ▲0.1147.77 ▼1.91
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.84 ▼6.97
Media Library /wp-admin/upload.php3.27 ▲0.0438.91 ▼3.16
CForms /wp-admin/admin.php?page=cforms3.2934.90
Submissions /wp-admin/admin.php?page=cforms_submissions3.2937.33

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 415 new files
Database: 5 new tables, 7 new options
New tables
wp_cforms_submission
wp_cforms_email
wp_cforms_form
wp_cforms_template
wp_cforms_field
New WordPress options
widget_theysaidso_widget
cforms_db_version
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for cForms - Light speed fast Form Builder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8013.16 ▼1.221.78 ▼0.0244.05 ▲0.59
Dashboard /wp-admin2,250 ▲475.89 ▲1.03104.94 ▼9.8489.91 ▲42.82
Posts /wp-admin/edit.php2,129 ▲292.02 ▼0.0236.89 ▼3.7937.48 ▼2.18
Add New Post /wp-admin/post-new.php1,702 ▲15722.68 ▼0.30686.49 ▲23.5161.27 ▲1.21
Media Library /wp-admin/upload.php1,423 ▲234.25 ▲0.0598.15 ▼11.8481.01 ▲33.03
CForms /wp-admin/admin.php?page=cforms9222.0731.3633.64
Submissions /wp-admin/admin.php?page=cforms_submissions9102.0326.3733.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 5 tables
    • wp_cforms_submission
    • wp_cforms_template
    • wp_cforms_form
    • wp_cforms_email
    • wp_cforms_field
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • cforms_db_version
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/cforms-plugin/public/partials/cforms-public-display.php
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CformsApi' not found in wp-content/plugins/cforms-plugin/admin/api/element.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'CformsApi' not found in wp-content/plugins/cforms-plugin/admin/api/config.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'CformsApi' not found in wp-content/plugins/cforms-plugin/admin/api/email.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'CformsApi' not found in wp-content/plugins/cforms-plugin/admin/api/path.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/cforms-plugin/lib/recaptcha/ReCaptcha/RequestMethod/CurlPost.php:37
    • > PHP Fatal error
      require_once(): Failed opening required 'PEAR.php' (include_path='.:/usr/share/php') in wp-content/plugins/cforms-plugin/lib/XML_Serializer/XML/Unserializer.php on line 53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cforms-plugin/public/autoload.php:12
    • > PHP Fatal error
      require_once(): Failed opening required 'PEAR.php' (include_path='.:/usr/share/php') in wp-content/plugins/cforms-plugin/lib/XML_Serializer/XML/Serializer.php on line 53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cforms-plugin/admin/autoload.php:11
    • > PHP Warning
      require_once(PEAR.php): failed to open stream: No such file or directory in wp-content/plugins/cforms-plugin/lib/XML_Serializer/XML/Serializer.php on line 53

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4, #5 in cforms-plugin/assets to your readme.txt
You can look at the official readme.txt

cforms-plugin/cforms.php 92% from 13 tests

The primary PHP file in "cForms - Light speed fast Form Builder" version 3.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cforms-plugin.php" instead of "cforms.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 detected52,701 lines of code in 312 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1833,7074,18633,755
CSS25346807,473
PHP581,1513,8704,366
SVG4003,153
HTML28153353,064
JSON12640742
INI11612146
Markdown1102

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.28
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity3.01
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes42
▷ Abstract classes00.00%
▷ Concrete classes42100.00%
▷ Final classes00.00%
Methods200
▷ Static methods8442.00%
▷ Public methods17386.50%
▷ Protected methods168.00%
▷ Private methods115.50%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants85
▷ Global constants7689.41%
▷ Class constants910.59%
▷ Public constants9100.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
5 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/elements/recaptcha.png13.36KB4.00KB▼ 70.08%
admin/images/elements/field-input-file.png3.74KB2.08KB▼ 44.44%
admin/images/elements/textarea.png8.96KB1.75KB▼ 80.48%
admin/images/cforms-large-mid-500x500.png32.86KB10.67KB▼ 67.55%
admin/images/icon_cforms.png1.35KB0.66KB▼ 51.01%