78% dev-con-form

Code Review | Dev Con Form

WordPress plugin Dev Con Form scored78%from 54 tests.

About plugin

  • Plugin page: dev-con-form
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8
  • WordPress version: 6.3.1
  • First release: Apr 7, 2017
  • Latest release: Oct 17, 2017
  • Number of updates: 28
  • Update frequency: every 6.9 days
  • Top authors: nodelondondev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /952 total downloads

Benchmarks

Plugin footprint 83% from 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.04MB] [CPU: ▼1.78ms] Passed 4 tests

Server-side resources used by Dev Con Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.61 ▲3.87
Dashboard /wp-admin3.36 ▲0.0551.06 ▲2.68
Posts /wp-admin/edit.php3.41 ▲0.0545.41 ▼3.97
Add New Post /wp-admin/post-new.php5.94 ▲0.0685.89 ▼5.98
Media Library /wp-admin/upload.php3.28 ▲0.0538.22 ▲0.17
Add New /wp-admin/post-new.php?post_type=dev-con-form3.3449.93
Contact Forms /wp-admin/edit.php?post_type=dev-con-form3.3239.67

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Dev Con Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15314.31 ▼0.0419.61 ▲17.8645.24 ▲2.70
Dashboard /wp-admin2,225 ▲485.64 ▼0.0292.08 ▲1.0042.51 ▲1.17
Posts /wp-admin/edit.php2,130 ▲331.99 ▲0.0536.89 ▼0.2334.13 ▼3.16
Add New Post /wp-admin/post-new.php1,555 ▲2920.94 ▼2.17685.63 ▲28.5155.36 ▼7.93
Media Library /wp-admin/upload.php1,436 ▲424.15 ▼0.0497.49 ▼2.9244.63 ▼2.95
Add New /wp-admin/post-new.php?post_type=dev-con-form1,7042.6050.2961.30
Contact Forms /wp-admin/edit.php?post_type=dev-con-form1,0772.0831.5630.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dev-con-form/admin/views/form-recaptcha-template.php
    • > /wp-content/plugins/dev-con-form/admin/views/form-settings-template.php
    • > /wp-content/plugins/dev-con-form/admin/views/form-messages-template.php
    • > /wp-content/plugins/dev-con-form/admin/views/form-layout-template.php
  • 24× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'NDCF_Helper' not found in wp-content/plugins/dev-con-form/form-templates/default.php:17
    • > PHP Notice
      Undefined variable: recaptcha_secret_key in wp-content/plugins/dev-con-form/admin/views/form-recaptcha-template.php on line 19
    • > PHP Warning
      Use of undefined constant NDCF_CODEPEN_EXAMPLE_URL - assumed 'NDCF_CODEPEN_EXAMPLE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/dev-con-form/admin/views/form-layout-template.php on line 1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/dev-con-form/admin/views/form-layout-template.php on line 10
    • > PHP Notice
      Undefined variable: error_summary in wp-content/plugins/dev-con-form/admin/views/form-messages-template.php on line 10
    • > PHP Notice
      Undefined variable: success in wp-content/plugins/dev-con-form/admin/views/form-messages-template.php on line 13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dev-con-form/admin/views/form-layout-template.php on line 3
    • > PHP Notice
      Undefined variable: overwrite_from_name in wp-content/plugins/dev-con-form/admin/views/form-settings-template.php on line 19
    • > PHP Notice
      Undefined variable: subject in wp-content/plugins/dev-con-form/admin/views/form-settings-template.php on line 2
    • > PHP Warning
      Use of undefined constant NDCF_CODEPEN_EXAMPLE_URL - assumed 'NDCF_CODEPEN_EXAMPLE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/dev-con-form/admin/views/form-layout-template.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: contact forms, form, mailer, recaptcha, contact...

dev-con-form/dev-con-form.php 92% from 13 tests

This is the main PHP file of "Dev Con Form" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 269 characters long)

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 detected1,346 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP153094051,131
JavaScript2780170
CSS27045

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity16.12
▷ Minimum class complexity3.00
▷ Maximum class complexity39.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods58
▷ Static methods1729.31%
▷ Public methods4781.03%
▷ Protected methods00.00%
▷ Private methods1118.97%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin