83% block-for-mailchimp

Code Review | MailChimp Block

WordPress plugin MailChimp Block scored83%from 54 tests.

About plugin

  • Plugin page: block-for-mailchimp
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 6, 2023
  • Latest release: Nov 9, 2023
  • Number of updates: 25
  • Update frequency: every 6.2 days
  • Top authors: btechnologies (96%)abuhayat (8%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /3,115 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▲1.31ms] Passed 4 tests

Server-side resources used by MailChimp Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.80 ▲0.38
Dashboard /wp-admin3.50 ▲0.2051.66 ▲1.95
Posts /wp-admin/edit.php3.62 ▲0.2646.93 ▼0.09
Add New Post /wp-admin/post-new.php6.07 ▲0.1895.96 ▲2.99
Media Library /wp-admin/upload.php3.42 ▲0.2037.47 ▲3.04
Mailchimp block /wp-admin/admin.php?page=block-for-mailchimp3.3835.50

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 58 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
mcbpro-redirect
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

MailChimp Block: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.61 ▲0.361.69 ▲0.0843.40 ▼0.03
Dashboard /wp-admin2,201 ▲215.62 ▼0.0396.61 ▼6.9841.40 ▼1.81
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0134.43 ▼6.0634.04 ▼2.80
Add New Post /wp-admin/post-new.php6,215 ▲4,68920.36 ▼3.03864.83 ▲178.1236.11 ▼23.28
Media Library /wp-admin/upload.php1,397 ▼64.22 ▼0.05100.26 ▲1.4741.15 ▼7.07
Mailchimp block /wp-admin/admin.php?page=block-for-mailchimp7982.3856.1131.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • mcbpro-redirect
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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 no errors were found, this is by no means 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 fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'BSDK' not found in wp-content/plugins/block-for-mailchimp/bplugins_sdk/inc/Base/License.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'BSDK' not found in wp-content/plugins/block-for-mailchimp/bplugins_sdk/inc/Base/Activate.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-for-mailchimp/mailchimp/API.php:6
    • > PHP Warning
      Use of undefined constant MCB_PLUGIN_VERSION - assumed 'MCB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/block-for-mailchimp/dist/editor.asset.php on line 3

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Requires at least: Version not formatted correctly
The official readme.txt might help

block-for-mailchimp/index.php 85% from 13 tests

The main file in "MailChimp Block" v. 1.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("block-for-mailchimp.php" instead of "index.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,690 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP1113337610
JavaScript157128477
JSON400281
Sass3115184
PO File25153133
CSS5085

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.71
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods44
▷ Static methods36.82%
▷ Public methods4295.45%
▷ Protected methods00.00%
▷ Private methods24.55%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
bplugins_sdk/dist/assets/images/shield_success.png3.47KB3.61KB0.00%