87% integration-of-capsule-crm-for-contact-form-7

Code Review | Contact Form 7 - Capsule CRM - Integration

WordPress plugin Contact Form 7 - Capsule CRM - Integration scored 87% from 54 tests.

About plugin

  • Plugin page: integration-of-ca...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 5.9.2
  • First release: Aug 18, 2020
  • Latest release: Jun 4, 2021
  • Number of updates: 14
  • Update frequency: every 20.7 days
  • Top authors: wisersteps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 789 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼291.34ms] Passed 4 tests

An overview of server-side resources used by Contact Form 7 - Capsule CRM - Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0158.62 ▲6.85
Dashboard /wp-admin3.41 ▲0.0034.04 ▲1.57
Posts /wp-admin/edit.php3.64 ▲0.0040.26 ▲3.57
Add New Post /wp-admin/post-new.php6.89 ▼0.0899.51 ▼1,158.97
Media Library /wp-admin/upload.php3.30 ▼0.0124.57 ▼11.54

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 172 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 - Capsule CRM - Integration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,785 ▲6216.19 ▲0.446.56 ▲0.572.06 ▲0.01
Dashboard /wp-admin2,895 ▲416.15 ▲0.01116.23 ▼20.04152.31 ▼4.76
Posts /wp-admin/edit.php2,694 ▲33.24 ▲0.0162.43 ▼4.19144.89 ▲3.67
Add New Post /wp-admin/post-new.php1,689 ▼6321.81 ▲0.49409.90 ▼53.16155.87 ▼11.01
Media Library /wp-admin/upload.php1,698 ▼05.48 ▼0.01149.72 ▲5.20186.42 ▼6.88

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/integration-of-capsule-crm-for-contact-form-7/freemius/templates/ajax-loader.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/integration-of-capsule-crm-for-contact-form-7/freemius/templates/account/partials/addon.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/integration-of-capsule-crm-for-contact-form-7/freemius/templates/partials/network-activation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CFCC_CAPSULE_CRM\\absint() in wp-content/plugins/integration-of-capsule-crm-for-contact-form-7/app/panel-page.php:10
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/integration-of-capsule-crm-for-contact-form-7/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/integration-of-capsule-crm-for-contact-form-7/app/option-page.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/integration-of-capsule-crm-for-contact-form-7/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/integration-of-capsule-crm-for-contact-form-7/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/integration-of-capsule-crm-for-contact-form-7/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/integration-of-capsule-crm-for-contact-form-7/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/integration-of-capsule-crm-for-contact-form-7/freemius/templates/account/partials/addon.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: The official readme.txt is a good inspiration

integration-of-capsule-crm-for-contact-form-7/contact-form-7-capsule-crm.php 77% from 13 tests

The principal PHP file in "Contact Form 7 - Capsule CRM - Integration" v. 1.0.4 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("integration-of-capsule-crm-for-contact-form-7.php" instead of "contact-form-7-capsule-crm.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 184 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin32,054 lines of code in 129 files:
LanguageFilesBlank linesComment linesLines of code
PHP1127,38216,07831,582
JavaScript44159216
PO File17272173
CSS121083

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,885)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity87.85
▷ Minimum class complexity1.00
▷ Maximum class complexity2,885.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes47
▷ Abstract classes24.26%
▷ Concrete classes4595.74%
▷ Final classes00.00%
Methods1,172
▷ Static methods18415.70%
▷ Public methods82970.73%
▷ Protected methods151.28%
▷ Private methods32827.99%
Functions97
▷ Named functions9698.97%
▷ Anonymous functions11.03%
Constants125
▷ Global constants10080.00%
▷ Class constants2520.00%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/contact-form-7-capsule-crm.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%