77% ari-cf7-connector

Code Review | Contact Form 7 Connector

WordPress plugin Contact Form 7 Connector scored 77% from 54 tests.

About plugin

  • Plugin page: ari-cf7-connector
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Apr 19, 2017
  • Latest release: Jun 22, 2023
  • Number of updates: 60
  • Update frequency: every 37.6 days
  • Top authors: arisoft (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

5,000+ active / 55,732 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.77ms] Passed 4 tests

Server-side resources used by Contact Form 7 Connector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.95 ▼2.44
Dashboard /wp-admin3.35 ▲0.0543.71 ▼3.60
Posts /wp-admin/edit.php3.46 ▲0.1146.82 ▼1.12
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.13 ▼7.37
Media Library /wp-admin/upload.php3.27 ▲0.0433.08 ▼1.67
/wp-admin/admin.php?page=ari-cf7connector-log3.3132.50

Server storage [IO: ▲2.78MB] [DB: ▲0.07MB] 67% from 3 tests

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • Illegal file modification found: 1 file (0.07KB) outside of "wp-content/plugins/ari-cf7-connector/" and "wp-content/uploads/"
    • (new file) wp-content/cf7connector-log/.htaccess
Filesystem: 756 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
ari_cf7connector_settings
can_compress_scripts
widget_recent-posts
widget_recent-comments
ari_cf7connector
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 Connector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.12 ▼1.551.68 ▼0.1343.21 ▼1.81
Dashboard /wp-admin2,222 ▲544.83 ▼1.05111.30 ▼18.7241.87 ▲0.24
Posts /wp-admin/edit.php2,102 ▲102.03 ▼0.0138.60 ▼3.1437.05 ▲2.33
Add New Post /wp-admin/post-new.php1,546 ▲423.31 ▲5.03639.69 ▲38.6648.62 ▼5.33
Media Library /wp-admin/upload.php1,404 ▲164.25 ▼0.0295.07 ▼8.5742.26 ▼2.68
/wp-admin/admin.php?page=ari-cf7connector-log90.440.053.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • ari_cf7connector_settings
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • ari_cf7connector
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ari-cf7-connector/contact-form-7-connector.php
    • > /wp-content/plugins/ari-cf7-connector/loader.php
  • 389× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/ari-cf7-connector/cf7_addons/mailerlite/libraries/vendor/vendor/php-http/message/src/Authentication/Wsse.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Client\\Common\\BatchClientInterface' not found in wp-content/plugins/ari-cf7-connector/cf7_addons/mailerlite/libraries/vendor/vendor/php-http/client-common/src/BatchClient.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\RequestMatcher' not found in wp-content/plugins/ari-cf7-connector/cf7_addons/mailerlite/libraries/vendor/vendor/php-http/message/src/RequestMatcher/RegexRequestMatcher.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\RequestFactory' not found in wp-content/plugins/ari-cf7-connector/cf7_addons/mailerlite/libraries/vendor/vendor/php-http/message-factory/src/MessageFactory.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Utils\\Options' not found in wp-content/plugins/ari-cf7-connector/libraries/arisoft/core/app/class-installer-options.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' not found in wp-content/plugins/ari-cf7-connector/cf7_addons/mailerlite/libraries/vendor/vendor/symfony/options-resolver/Exception/InvalidArgumentException.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/ari-cf7-connector/cf7_addons/mailchimp/forms/fields/tmpl/mailchimp-apikey-list.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Client\\Common\\Plugin' not found in wp-content/plugins/ari-cf7-connector/cf7_addons/mailerlite/libraries/vendor/vendor/php-http/client-common/src/Plugin/ContentTypePlugin.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Discovery\\Strategy\\DiscoveryStrategy' not found in wp-content/plugins/ari-cf7-connector/cf7_addons/mailerlite/libraries/vendor/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Client\\Common\\Plugin\\SeekableBodyPlugin' not found in wp-content/plugins/ari-cf7-connector/cf7_addons/mailerlite/libraries/vendor/vendor/php-http/client-common/src/Plugin/ResponseSeekableBodyPlugin.php:17

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #2, #3, #4, #5, #6 in ari-cf7-connector/assets to your readme.txt
The official readme.txt is a good inspiration

ari-cf7-connector/contact-form-7-connector.php 85% from 13 tests

The entry point to "Contact Form 7 Connector" version 1.2.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("ari-cf7-connector.php" instead of "contact-form-7-connector.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin60,446 lines of code in 705 files:
LanguageFilesBlank linesComment linesLines of code
PHP5968,55215,88249,529
Markdown392,15104,938
JSON35203,123
JavaScript15593132,026
CSS711223665
YAML7223100
XML23340
SVG30015
Dockerfile18010

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.50
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces107
Interfaces54
Traits17
Classes465
▷ Abstract classes153.23%
▷ Concrete classes45096.77%
▷ Final classes12026.67%
Methods2,604
▷ Static methods32512.48%
▷ Public methods2,05879.03%
▷ Protected methods2539.72%
▷ Private methods29311.25%
Functions335
▷ Named functions9227.46%
▷ Anonymous functions24372.54%
Constants315
▷ Global constants11034.92%
▷ Class constants20565.08%
▷ Public constants19796.10%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/common/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
assets/common/css/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
assets/common/css/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
assets/common/css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
assets/common/css/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%