72% recorp-divi-mailchimp-extension

Code Review | ReCorp Divi MailChimp Extension

WordPress plugin ReCorp Divi MailChimp Extension scored 72% from 54 tests.

About plugin

  • Plugin page: recorp-divi-mailc...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Jul 14, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 5
  • Update frequency: every 151.2 days
  • Top authors: recorp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.57ms] Passed 4 tests

Server-side resources used by ReCorp Divi MailChimp Extension
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.41 ▼5.33
Dashboard /wp-admin3.34 ▲0.0345.02 ▼3.44
Posts /wp-admin/edit.php3.39 ▲0.0348.11 ▼0.64
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.73 ▲8.73
Media Library /wp-admin/upload.php3.26 ▲0.0331.61 ▼0.87
Mailchimp for Divi /wp-admin/options-general.php?page=mailchimp-for-divi3.3333.96

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for ReCorp Divi MailChimp Extension
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲14913.50 ▼0.807.90 ▲6.2939.99 ▼5.18
Dashboard /wp-admin2,213 ▲244.85 ▼0.08107.11 ▼8.1337.01 ▼5.48
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0338.62 ▲3.6934.18 ▼1.57
Add New Post /wp-admin/post-new.php1,545 ▲2518.15 ▼5.13605.90 ▼71.0751.38 ▼11.24
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0797.04 ▲1.8945.90 ▲5.63
Mailchimp for Divi /wp-admin/options-general.php?page=mailchimp-for-divi1,2292.4536.7250.07

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mailchimp-for-divi
    • > Notice in wp-content/plugins/recorp-divi-mailchimp-extension/admin/partials/divi-contact-form-mailchimp-extension-admin-display.php+108
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=mailchimp-for-divi
    • > Warning in wp-content/plugins/recorp-divi-mailchimp-extension/admin/partials/divi-contact-form-mailchimp-extension-admin-display.php+245
    Invalid argument supplied for foreach()

SRP 0% 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/recorp-divi-mailchimp-extension/public/partials/divi-contact-form-mailchimp-extension-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/recorp-divi-mailchimp-extension/admin/partials/divi-contact-form-mailchimp-extension-admin-display.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: divi mailchimp extension, mailchimp for divi, mailchimp, contact form, divi...

recorp-divi-mailchimp-extension/divi-contact-form-mailchimp-extension.php 85% from 13 tests

The main PHP file in "ReCorp Divi MailChimp Extension" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("recorp-divi-mailchimp-extension.php" instead of "divi-contact-form-mailchimp-extension.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,669 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript73754151,425
PHP124565321,011
CSS32811233

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.00
▷ Minimum class complexity1.00
▷ Maximum class complexity90.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods42
▷ Static methods24.76%
▷ Public methods3276.19%
▷ Protected methods00.00%
▷ Private methods1023.81%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/pro_version_layout.png53.44KB26.17KB▼ 51.04%
admin/images/plus-button.png0.81KB0.63KB▼ 22.68%
admin/images/minus-button.png0.77KB0.58KB▼ 24.46%