83% gwebpro-contact-form-7-mailchimp-extension

Code Review | Gwebpro Contact Form 7 MailChimp Extension

WordPress plugin Gwebpro Contact Form 7 MailChimp Extension scored83%from 54 tests.

About plugin

  • Plugin page: gwebpro-contact-f...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.4.1
  • WordPress version: 6.3.1
  • First release: May 28, 2015
  • Latest release: Jan 12, 2016
  • Number of updates: 13
  • Update frequency: every 17.6 days
  • Top authors: moonheart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,776 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.53ms] Passed 4 tests

Server-side resources used by Gwebpro Contact Form 7 MailChimp Extension
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.86 ▲1.00
Dashboard /wp-admin3.32 ▲0.0142.78 ▼5.15
Posts /wp-admin/edit.php3.37 ▲0.0140.49 ▼3.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.98 ▼8.99
Media Library /wp-admin/upload.php3.24 ▲0.0132.94 ▼4.84

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
cf7_mch_end
widget_recent-comments
db_upgraded
cf7_count
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Gwebpro Contact Form 7 MailChimp Extension
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.241.72 ▲0.1043.86 ▲3.21
Dashboard /wp-admin2,195 ▲185.54 ▼0.1282.25 ▼10.6837.37 ▼2.19
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0833.40 ▼1.4237.28 ▲0.73
Add New Post /wp-admin/post-new.php1,537 ▲218.66 ▲0.42595.82 ▼41.0053.03 ▼10.35
Media Library /wp-admin/upload.php1,403 ▼04.20 ▲0.0298.69 ▼0.2846.89 ▲4.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • cf7_mch_end
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • cf7_count

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/gwebpro-contact-form-7-mailchimp-extension/gwebpro-cf7-mailchimp-extention.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gwebpro-contact-form-7-mailchimp-extension/lib/enqueue.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gwebpro-contact-form-7-mailchimp-extension/lib/functions.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% 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
These attributes need to be fixed: The official readme.txt might help

gwebpro-contact-form-7-mailchimp-extension/gwebpro-cf7-mailchimp-extention.php 77% from 13 tests

"Gwebpro Contact Form 7 MailChimp Extension" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gwebpro-contact-form-7-mailchimp-extension.php" instead of "gwebpro-cf7-mailchimp-extention.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("http://www.gwebpro.com/")

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
Good job! No executable or dangerous file extensions detected730 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP10152188600
JSON22059
Markdown221044
JavaScript13016
CSS13511

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity16.33
▷ Minimum class complexity4.00
▷ Maximum class complexity39.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin