84% contact-form-user-to-mailchimp-audience

Code Review | Contact Form user to Mailchimp Audience

WordPress plugin Contact Form user to Mailchimp Audience scored84%from 54 tests.

About plugin

  • Plugin page: contact-form-user...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 14, 2021
  • Latest release: Sep 14, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: superpuperlesha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /309 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.75ms] Passed 4 tests

A check of server-side resources used by Contact Form user to Mailchimp Audience
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.07 ▼3.68
Dashboard /wp-admin3.38 ▲0.0849.84 ▼0.59
Posts /wp-admin/edit.php3.49 ▲0.1451.78 ▲1.22
Add New Post /wp-admin/post-new.php5.96 ▲0.0886.16 ▼7.96
Media Library /wp-admin/upload.php3.30 ▲0.0843.29 ▲4.97

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form user to Mailchimp Audience
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.26 ▼0.361.86 ▲0.0740.35 ▼3.80
Dashboard /wp-admin2,196 ▲195.55 ▼0.1685.81 ▼20.1338.19 ▼9.01
Posts /wp-admin/edit.php2,101 ▼21.99 ▼0.0040.81 ▼16.7737.97 ▼8.07
Add New Post /wp-admin/post-new.php1,548 ▲1723.10 ▼0.14630.77 ▼73.1961.28 ▲9.53
Media Library /wp-admin/upload.php1,404 ▲44.23 ▼0.0198.02 ▼16.7543.91 ▼3.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/contact-form-user-to-mailchimp-audience/admin_menu.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (The plugin has a menu here.)
The official readme.txt might help

contact-form-user-to-mailchimp-audience/wm_cf7_userto_mchimp.php 92% from 13 tests

Analyzing the main PHP file in "Contact Form user to Mailchimp Audience" version 1.0.0
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("contact-form-user-to-mailchimp-audience.php" instead of "wm_cf7_userto_mchimp.php")

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
Everything looks great! No dangerous files found in this plugin565 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP46325399
PO File26768166

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.37
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods888.89%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin