71% form-generator-powered-by-jotform

Code Review | Form Generator for WordPress

WordPress plugin Form Generator for WordPress scored71%from 54 tests.

About plugin

  • Plugin page: form-generator-po...
  • Plugin version: 1.52
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2013
  • Latest release: Feb 27, 2014
  • Number of updates: 31
  • Update frequency: every 4.9 days
  • Top authors: tmontg1 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /16,667 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼3.02ms] Passed 4 tests

This is a short check of server-side resources used by Form Generator for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1539.34 ▼1.33
Dashboard /wp-admin3.54 ▲0.2349.14 ▲4.28
Posts /wp-admin/edit.php3.59 ▲0.2348.79 ▲2.54
Add New Post /wp-admin/post-new.php6.07 ▲0.1982.24 ▼13.91
Media Library /wp-admin/upload.php3.39 ▲0.1734.99 ▲0.61
All Forms /wp-admin/admin.php?page=jc-base3.4336.39
Submissions /wp-admin/admin.php?page=jc-submissions3.6234.69
Settings /wp-admin/admin.php?page=jc-settings-page3.3629.84

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Form Generator for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲17713.99 ▼0.395.42 ▲3.3743.00 ▲2.05
Dashboard /wp-admin2,234 ▲464.97 ▲0.14114.07 ▲9.4167.97 ▲23.20
Posts /wp-admin/edit.php2,133 ▲412.06 ▲0.0336.19 ▼6.2131.05 ▼5.20
Add New Post /wp-admin/post-new.php1,704 ▲18422.40 ▼0.78635.08 ▼53.2031.44 ▼25.91
Media Library /wp-admin/upload.php1,419 ▲344.24 ▼0.0199.25 ▼3.4775.78 ▲30.79
All Forms /wp-admin/admin.php?page=jc-base7101.546.7719.20
Submissions /wp-admin/admin.php?page=jc-submissions7131.547.1219.41
Settings /wp-admin/admin.php?page=jc-settings-page7551.547.4121.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jc-settings-page
    • > Warning in wp-content/plugins/form-generator-powered-by-jotform/inc/jc-settings-page.php+23
    Illegal string offset 'jc_api_key'
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jc-settings-page
    • > Notice in wp-content/plugins/form-generator-powered-by-jotform/inc/jc-settings-page.php+23
    Uninitialized string offset: 0
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jc-submissions
    • > Deprecated in wp-content/plugins/form-generator-powered-by-jotform/inc/PHPExcel/Shared/String.php+537
    Array and string offset access syntax with curly braces is deprecated

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 99× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/form-generator-powered-by-jotform/jotform-connect.php:37
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/form-generator-powered-by-jotform/inc/submissions-template.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/form-generator-powered-by-jotform/inc/PHPExcel/Style/Border.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/form-generator-powered-by-jotform/inc/dx-sample-widget.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Abstract' not found in wp-content/plugins/form-generator-powered-by-jotform/inc/PHPExcel/Writer/Excel2007.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/form-generator-powered-by-jotform/inc/PHPExcel/Style.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/form-generator-powered-by-jotform/inc/PHPExcel/CachedObjectStorage/MemoryGZip.php:36
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/form-generator-powered-by-jotform/inc/base-template.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_HTML' not found in wp-content/plugins/form-generator-powered-by-jotform/inc/PHPExcel/Writer/PDF/Core.php:36
    • > PHP Warning
      require_once(PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php): failed to open stream: No such file or directory in wp-content/plugins/form-generator-powered-by-jotform/inc/PHPExcel/Shared/trend/polynomialBestFitClass.php on line 29

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jc-settings-page
    • > Javascript (severe) in unknown
    /wp-content/plugins/form-generator-powered-by-jotform/js/jc-script-admin.js?ver=6.3.1 21:25 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Invalid URI ("")
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

form-generator-powered-by-jotform/jotform-connect.php 85% from 13 tests

"Form Generator for WordPress" version 1.52's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("form-generator-powered-by-jotform.php" instead of "jotform-connect.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 423 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected54,297 lines of code in 208 files:
LanguageFilesBlank linesComment linesLines of code
PHP19711,96636,16552,307
JavaScript62383721,723
CSS2175144
PO File14954109
XML20014

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,157)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity53.66
▷ Minimum class complexity1.00
▷ Maximum class complexity1,157.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes185
▷ Abstract classes63.24%
▷ Concrete classes17996.76%
▷ Final classes00.00%
Methods2,787
▷ Static methods61121.92%
▷ Public methods2,28882.10%
▷ Protected methods311.11%
▷ Private methods46816.79%
Functions50
▷ Named functions50100.00%
▷ Anonymous functions00.00%
Constants799
▷ Global constants12615.77%
▷ Class constants67384.23%
▷ Public constants673100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 1.13MB with 0.80MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png154.69KB47.66KB▼ 69.19%
screenshot-4.png123.02KB42.56KB▼ 65.40%
js/jotform.png3.46KB0.84KB▼ 75.67%
screenshot-10.png71.42KB19.95KB▼ 72.06%
screenshot-8.png168.20KB50.59KB▼ 69.92%