10% cf7-getresponse

Code Review | Contact Form 7 GetResponse Extension

WordPress plugin Contact Form 7 GetResponse Extension scored10%from 54 tests.

About plugin

  • Plugin page: cf7-getresponse
  • Plugin version: 0.5.26
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.9
  • WordPress version: 6.3.1
  • First release: May 29, 2017
  • Latest release: Sep 8, 2021
  • Number of updates: 34
  • Update frequency: every 46.0 days
  • Top authors: rnzo (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /12,791 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/cf7-getresponse/lib/tools.php+116
    max(): Array must contain at least one element

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.67ms] Passed 4 tests

Analyzing server-side resources used by Contact Form 7 GetResponse Extension
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.90 ▼33.08
Dashboard /wp-admin2.09 ▼1.257.81 ▼52.94
Posts /wp-admin/edit.php2.09 ▼1.268.71 ▼40.13
Add New Post /wp-admin/post-new.php2.09 ▼3.797.92 ▼92.52
Media Library /wp-admin/upload.php2.09 ▼1.138.31 ▼26.28

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 GetResponse Extension
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.58 ▼0.791.78 ▼0.0338.68 ▼6.77
Dashboard /wp-admin2,272 ▲844.90 ▼0.98111.28 ▲11.3247.74 ▲2.25
Posts /wp-admin/edit.php2,154 ▲662.20 ▲0.1442.89 ▲0.8642.10 ▲6.15
Add New Post /wp-admin/post-new.php1,573 ▲4523.47 ▲5.29575.66 ▼52.3750.20 ▼9.84
Media Library /wp-admin/upload.php1,454 ▲664.24 ▲0.01125.22 ▲29.1457.87 ▲15.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/cf7-getresponse/lib/tools.php+116
    max(): Array must contain at least one element
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'SPARTAN_VCGR_PLUGIN_DIR/lib/activate.php' (include_path='.:/usr/share/php') in wp-content/plugins/cf7-getresponse/lib/getresponse.php on line 20
    • > PHP Warning
      Use of undefined constant SPARTAN_VCGR_PLUGIN_DIR - assumed 'SPARTAN_VCGR_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cf7-getresponse/lib/getresponse.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-getresponse/lib/activate.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cf7-getresponse/lib/functions.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/cf7-getresponse/cf7-extension.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/cf7-getresponse/lib/view.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-getresponse/lib/enqueue.php:32
    • > PHP Warning
      Use of undefined constant SPARTAN_VCGR_VERSION - assumed 'SPARTAN_VCGR_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/cf7-getresponse/lib/view.php on line 39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cf7-getresponse/lib/wp.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cf7-getresponse/lib/tools.php:93

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (GetResponse-contact-form-screenshot-1.png), #2 (GetResponse-contact-form-screenshot-2.png)
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
Please take inspiration from this readme.txt

cf7-getresponse/cf7-extension.php 85% from 13 tests

The principal PHP file in "Contact Form 7 GetResponse Extension" v. 0.5.26 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cf7-getresponse.php" instead of "cf7-extension.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,043 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10416270737
CSS28135271
JavaScript126034
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/postmark-getresponse.png1.82KB1.80KB▼ 0.81%
assets/images/postal-marks.png0.33KB0.35KB0.00%