73% chimpbridge

Code Review | ChimpBridge - Create and Send Mailchimp Campaigns in WordPress

WordPress plugin ChimpBridge - Create and Send Mailchimp Campaigns in WordPress scored73%from 54 tests.

About plugin

  • Plugin page: chimpbridge
  • Plugin version: 1.2.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2
  • WordPress version: 6.3.1
  • First release: Apr 13, 2017
  • Latest release: Apr 19, 2023
  • Number of updates: 42
  • Update frequency: every 52.8 days
  • Top authors: brianhogg (64.29%)linksoftware (38.1%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,326 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▲1.12ms] Passed 4 tests

Analyzing server-side resources used by ChimpBridge - Create and Send Mailchimp Campaigns in WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2245.85 ▲3.03
Dashboard /wp-admin3.54 ▲0.2459.78 ▲4.86
Posts /wp-admin/edit.php3.65 ▲0.2959.09 ▲7.39
Add New Post /wp-admin/post-new.php5.91 ▲0.03100.27 ▼10.80
Media Library /wp-admin/upload.php3.46 ▲0.2345.75 ▲10.67
New Campaign /wp-admin/post-new.php?post_type=chimpbridge3.6054.08
All Campaigns /wp-admin/edit.php?post_type=chimpbridge3.5058.34
Settings /wp-admin/edit.php?post_type=chimpbridge&page=chimpbridge-settings3.4335.84

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
chimpbridge_error_notices
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for ChimpBridge - Create and Send Mailchimp Campaigns in WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10913.28 ▼1.115.88 ▲3.9840.17 ▼6.32
Dashboard /wp-admin2,258 ▲705.88 ▲0.96109.40 ▼12.1839.39 ▼3.58
Posts /wp-admin/edit.php2,140 ▲542.05 ▲0.0140.58 ▲2.4138.99 ▲4.85
Add New Post /wp-admin/post-new.php1,576 ▲3817.76 ▼5.36609.83 ▼8.1955.33 ▼2.53
Media Library /wp-admin/upload.php1,440 ▲524.30 ▲0.1099.73 ▼3.3941.65 ▼6.53
New Campaign /wp-admin/post-new.php?post_type=chimpbridge2,6847.94188.2375.14
All Campaigns /wp-admin/edit.php?post_type=chimpbridge1,1422.0640.4741.39
Settings /wp-admin/edit.php?post_type=chimpbridge&page=chimpbridge-settings8892.1327.0836.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • chimpbridge_error_notices
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=chimpbridge
    • > Notice in wp-content/plugins/chimpbridge/chimpbridge.php+569
    Undefined offset: 1
    • > GET request to /wp-admin/post-new.php?post_type=chimpbridge
    • > Notice in wp-content/plugins/chimpbridge/chimpbridge.php+670
    Trying to access array offset on value of type bool

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/chimpbridge/templates/meta_box_preview.php
  • 20× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/chimpbridge/templates/_inc/settings_tab_logic.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/chimpbridge/templates/_inc/settings_tab_logic.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/chimpbridge/templates/_inc/settings_tab_logic.php:12
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/chimpbridge/templates/meta_box_options.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/chimpbridge/templates/page_settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chimpbridge/lib/chimpbridge-error-notices.php:15
    • > PHP Notice
      Trying to get property 'post_content' of non-object in wp-content/plugins/chimpbridge/templates/preview.php on line 6
    • > PHP Notice
      Trying to get property 'post_content' of non-object in wp-content/plugins/chimpbridge/templates/meta_box_options.php on line 6
    • > PHP Warning
      include(CHIMPBRIDGE_DIR/templates/preview.php): failed to open stream: No such file or directory in wp-content/plugins/chimpbridge/templates/meta_box_preview.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/chimpbridge/templates/verify.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: campaign, mailchimp sending, newsletter, mailchimp, mailchimp integration

chimpbridge/chimpbridge.php Passed 13 tests

The main PHP script in "ChimpBridge - Create and Send Mailchimp Campaigns in WordPress" version 1.2.3 is automatically included on every request by WordPress
72 characters long description:
Create and send Mailchimp Campaigns right inside of the WordPress admin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected2,106 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP152563861,210
CSS27923353
JavaScript28391314
Markdown1460229

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity51.00
▷ Minimum class complexity5.00
▷ Maximum class complexity97.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods64
▷ Static methods11.56%
▷ Public methods64100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/mystery-avatar.png2.37KB1.01KB▼ 57.36%