83% contact-form-7-mailchimp-extension

Code Review | Contact Form 7 Extension For Mailchimp

WordPress plugin Contact Form 7 Extension For Mailchimp scored83%from 54 tests.

About plugin

  • Plugin page: contact-form-7-ma...
  • Plugin version: 0.5.70
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Jan 21, 2015
  • Latest release: Nov 24, 2023
  • Number of updates: 396
  • Update frequency: every 8.2 days
  • Top authors: rnzo (100%)

Code review

54 tests

User reviews

189 reviews

Install metrics

90,000+ active /9,123,742 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.45MB] [CPU: ▲13.44ms] Passed 4 tests

Analyzing server-side resources used by Contact Form 7 Extension For Mailchimp
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.91 ▲2.4493.83 ▲51.08
Dashboard /wp-admin4.02 ▲0.67578.67 ▲516.93
Posts /wp-admin/edit.php3.77 ▲0.4147.77 ▼0.16
Add New Post /wp-admin/post-new.php6.26 ▲0.3896.55 ▼0.21
Media Library /wp-admin/upload.php3.58 ▲0.3536.92 ▲3.06

Server storage [IO: ▲0.20MB] [DB: ▲0.01MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • The plugin illegally modified 140 files (776.82KB) outside of "wp-content/plugins/contact-form-7-mailchimp-extension/" and "wp-content/uploads/"
    • (new file) wp-content/plugins/contact-form-7/admin/includes/admin-functions.php
    • (new file) wp-content/plugins/contact-form-7/admin/includes/editor.php
    • (new file) wp-content/plugins/contact-form-7/admin/css/styles.css
    • (new file) wp-content/plugins/contact-form-7/admin/includes/class-contact-forms-list-table.php
    • (new file) wp-content/plugins/contact-form-7/admin/admin.php
    • (new file) wp-content/plugins/contact-form-7/admin/edit-contact-form.php
    • (new file) wp-content/plugins/contact-form-7/admin/includes/help-tabs.php
    • (new file) wp-content/plugins/contact-form-7/admin/includes/config-validator.php
    • (new file) wp-content/plugins/contact-form-7/admin/css/styles-rtl.css
    • (new file) wp-content/plugins/contact-form-7/admin/includes/tag-generator.php
    • ...
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
wpcf7
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form 7 Extension For Mailchimp
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲13414.28 ▼0.432.24 ▲0.5838.23 ▼5.62
Dashboard /wp-admin2,300 ▲1205.66 ▲0.0288.18 ▼13.2643.00 ▼1.18
Posts /wp-admin/edit.php2,205 ▲1052.17 ▲0.2139.31 ▼0.5038.72 ▲0.92
Add New Post /wp-admin/post-new.php6,448 ▲4,91727.73 ▲4.92906.09 ▲276.8938.37 ▼20.15
Media Library /wp-admin/upload.php1,502 ▲994.31 ▲0.1498.47 ▲2.7746.14 ▲2.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • wpcf7
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% 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 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 take a closer look at the following
  • 21× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-mailchimp-extension/lib/find.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/contact-form-7-mailchimp-extension/chimpmatic-lite.php:36
    • > PHP Warning
      Use of undefined constant SPARTAN_MCE_PLUGIN_DIR - assumed 'SPARTAN_MCE_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/contact-form-7-mailchimp-extension/lib/mailchimp.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-mailchimp-extension/lib/activate.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/contact-form-7-mailchimp-extension/lib/meta.php:35
    • > PHP Notice
      Undefined variable: chm_invalid in wp-content/plugins/contact-form-7-mailchimp-extension/lib/view.php on line 191
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-mailchimp-extension/lib/jobs.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/contact-form-7-mailchimp-extension/lib/parts/tanu.php:21
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/contact-form-7-mailchimp-extension/lib/action.php on line 21
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/contact-form-7-mailchimp-extension/lib/action.php on line 21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% 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: mailchimp tags, chimpmatic, mailchimp, marketing, email...

contact-form-7-mailchimp-extension/chimpmatic-lite.php 77% from 13 tests

The main PHP file in "Contact Form 7 Extension For Mailchimp" ver. 0.5.70 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "5.6")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("contact-form-7-mailchimp-extension.php" instead of "chimpmatic-lite.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 glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected3,354 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP201,4805512,338
CSS226976763
JavaScript220857252
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions94
▷ Named functions9297.87%
▷ Anonymous functions22.13%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/postal-stamp.png21.35KB9.48KB▼ 55.60%
assets/images/postal-marks.png0.33KB0.35KB0.00%