68% campaign-monitor-wp

Code Review | Campaign Monitor Forms by Optin Cat

WordPress plugin Campaign Monitor Forms by Optin Cat scored 68% from 54 tests.

About plugin

  • Plugin page: campaign-monitor-wp
  • Plugin version: 2.5.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 24, 2014
  • Latest release: Sep 27, 2023
  • Number of updates: 135
  • Update frequency: every 24.4 days
  • Top authors: davidhme (63.7%)fatcatapps (28.15%)flippy101 (6.67%)RyanNovotny (3.7%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active / 29,420 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.44ms] Passed 4 tests

A check of server-side resources used by Campaign Monitor Forms by Optin Cat
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1444.24 ▲4.30
Dashboard /wp-admin3.44 ▲0.1350.04 ▲3.40
Posts /wp-admin/edit.php3.54 ▲0.1848.03 ▼2.93
Add New Post /wp-admin/post-new.php6.01 ▲0.1294.16 ▼1.48
Media Library /wp-admin/upload.php3.35 ▲0.1234.79 ▼0.74
Add New /wp-admin/post-new.php?post_type=easy-opt-ins6.4573.80
Settings /wp-admin/edit.php?post_type=easy-opt-ins&page=fca_eoi_settings_page3.3235.07
Upgrade to Premium /wp-admin/edit.php?post_type=easy-opt-ins&page=eoi_premium_upgrade3.1525.09
All Optin Forms /wp-admin/edit.php?post_type=easy-opt-ins3.3937.69
Subscribers /wp-admin/edit.php?post_type=easy-opt-ins&page=fca_eoi_subscribers_page3.3234.33

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 270 new files
Database: 2 new tables, 10 new options
New tables
wp_fca_eoi_subscribers
wp_fca_eoi_activity
New WordPress options
widget_recent-comments
fca_eoi_subscribers_table_ver
widget_theysaidso_widget
theysaidso_admin_options
widget_easy-opt-in-widget
db_upgraded
widget_recent-posts
can_compress_scripts
fca_eoi_settings
fca_eoi_allow_customform

Browser metrics Passed 4 tests

This is an overview of browser requirements for Campaign Monitor Forms by Optin Cat
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,097 ▲36214.66 ▲0.132.52 ▲0.8144.27 ▲4.18
Dashboard /wp-admin2,501 ▲3136.26 ▲0.39120.97 ▲17.3088.62 ▲46.06
Posts /wp-admin/edit.php2,143 ▲542.06 ▲0.0640.12 ▲4.7936.39 ▲2.83
Add New Post /wp-admin/post-new.php6,635 ▲5,10722.16 ▲3.83843.42 ▲220.6537.03 ▼13.02
Media Library /wp-admin/upload.php1,442 ▲574.15 ▼0.0395.12 ▼1.2274.95 ▲30.29
Add New /wp-admin/post-new.php?post_type=easy-opt-ins6,8617.25293.49174.10
Settings /wp-admin/edit.php?post_type=easy-opt-ins&page=fca_eoi_settings_page1,2493.2669.7144.19
Upgrade to Premium /wp-admin/edit.php?post_type=easy-opt-ins&page=eoi_premium_upgrade1,0896.33277.11147.44
All Optin Forms /wp-admin/edit.php?post_type=easy-opt-ins1,2612.1735.7937.96
Subscribers /wp-admin/edit.php?post_type=easy-opt-ins&page=fca_eoi_subscribers_page9511.7328.6527.46

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_fca_eoi_subscribers
    • wp_fca_eoi_activity
  • Zombie WordPress options were found after uninstall: 9 options
    • theysaidso_admin_options
    • widget_easy-opt-in-widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • fca_eoi_settings
    • can_compress_scripts
    • widget_theysaidso_widget
    • fca_eoi_subscribers_table_ver

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
  • 62× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant FCA_EOI_PLUGIN_DIR - assumed 'FCA_EOI_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/campaign-monitor-wp/includes/eoi-powerups.php on line 7
    • > PHP Warning
      require_once(FCA_EOI_PLUGIN_DIRincludes/eoi-layout.php): failed to open stream: No such file or directory in wp-content/plugins/campaign-monitor-wp/layouts/common/layout_15/layout.php on line 4
    • > PHP Warning
      Use of undefined constant FCA_EOI_PLUGIN_DIR - assumed 'FCA_EOI_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/campaign-monitor-wp/layouts/common/layout_16/layout.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'FCA_EOI_PLUGIN_DIRincludes/eoi-layout.php' (include_path='.:/usr/share/php') in wp-content/plugins/campaign-monitor-wp/layouts/common/layout_16/layout.php on line 4
    • > PHP Warning
      Use of undefined constant FCA_EOI_PLUGIN_DIR - assumed 'FCA_EOI_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/campaign-monitor-wp/layouts/common/layout_16/layout.php on line 4
    • > PHP Warning
      require_once(FCA_EOI_PLUGIN_DIRincludes/eoi-layout.php): failed to open stream: No such file or directory in wp-content/plugins/campaign-monitor-wp/layouts/common/layout_1/layout.php on line 4
    • > PHP Warning
      Use of undefined constant FCA_EOI_PLUGIN_DIR - assumed 'FCA_EOI_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/campaign-monitor-wp/layouts/common/layout_2/layout.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'FCA_EOI_PLUGIN_DIRincludes/eoi-layout.php' (include_path='.:/usr/share/php') in wp-content/plugins/campaign-monitor-wp/layouts/common/layout_2/layout.php on line 4
    • > PHP Warning
      require_once(FCA_EOI_PLUGIN_DIRincludes/eoi-layout.php): failed to open stream: No such file or directory in wp-content/plugins/campaign-monitor-wp/layouts/common/layout_2/layout.php on line 4
    • > PHP Warning
      Use of undefined constant FCA_EOI_PLUGIN_DIR - assumed 'FCA_EOI_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/campaign-monitor-wp/layouts/common/layout_5/layout.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=easy-opt-ins&page=fca_eoi_settings_page
    • > Deprecation (warning) in unknown
    /wp-content/plugins/campaign-monitor-wp/assets/vendor/wysi/wysihtml.min.js?ver=2.5.6 9 Listener added for a synchronous 'DOMNodeRemoved' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Examples of the Campaign Monitor form designs), #2 (The Campaign Monitor Opt-in Form Builder), #3 (Campaign Monitor Post Box), #4 (Campaign Monitor Popup), #5 (Another Campaign Monitor Post Box), #6 (Campaign Monitor Analytics), #7 (The whole settings screen)
The official readme.txt is a good inspiration

campaign-monitor-wp/campaign-monitor-wp.php Passed 13 tests

The main PHP file in "Campaign Monitor Forms by Optin Cat" ver. 2.5.6 adds more information about the plugin and also serves as the entry point for this plugin
135 characters long description:
Campaign Monitor Optin Cat Helps You Get More Email Subscribers. Create Beautiful Campaign Monitor Opt-In Forms In Less Than 2 Minutes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin11,583 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP641,9013,9547,321
JavaScript344071881,896
CSS27145221,102
Sass201060534
Markdown41550365
HTML22170306
JSON20041
YAML12018

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.74
▷ Minimum class complexity1.00
▷ Maximum class complexity208.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes43
▷ Abstract classes00.00%
▷ Concrete classes43100.00%
▷ Final classes00.00%
Methods355
▷ Static methods164.51%
▷ Public methods31889.58%
▷ Protected methods00.00%
▷ Private methods3710.42%
Functions52
▷ Named functions52100.00%
▷ Anonymous functions00.00%
Constants42
▷ Global constants42100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
68 compressed PNG files occupy 1.28MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
layouts/screenshots/postbox_4.png14.62KB16.10KB0.00%
layouts/screenshots/lightbox_22.png79.30KB85.93KB0.00%
assets/admin/onboarding-arrow.png0.83KB1.04KB0.00%
layouts/screenshots/lightbox_16.png12.70KB14.29KB0.00%
layouts/screenshots/postbox_22.png59.73KB64.53KB0.00%