88% nettantra-caldera-forms-mautic-integration

Code Review | NetTantra Caldera Forms - Mautic Integration

WordPress plugin NetTantra Caldera Forms - Mautic Integration scored 88% from 54 tests.

About plugin

  • Plugin page: nettantra-caldera...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.2
  • WordPress version: 5.8.1
  • First release: Jul 27, 2018
  • Latest release: Jun 5, 2019
  • Number of updates: 5
  • Update frequency: every 62.8 days
  • Top authors: nettantra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 3,719 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.00MB] [CPU: ▼138.43ms] Passed 4 tests

A check of server-side resources used by NetTantra Caldera Forms - Mautic Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.04 ▲13.19
Dashboard /wp-admin3.06 ▲0.0045.63 ▲10.52
Posts /wp-admin/edit.php3.11 ▲0.0044.25 ▲2.53
Add New Post /wp-admin/post-new.php5.42 ▼0.0289.84 ▼561.76
Media Library /wp-admin/upload.php3.01 ▲0.0034.34 ▼5.00

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 160 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by NetTantra Caldera Forms - Mautic Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.90 ▲0.3810.99 ▲1.8646.78 ▼9.21
Dashboard /wp-admin2,970 ▲396.04 ▲0.10137.13 ▼9.66110.69 ▼8.24
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0065.71 ▲3.1692.98 ▼6.85
Add New Post /wp-admin/post-new.php1,683 ▲18516.19 ▼2.66428.61 ▲48.84118.12 ▲5.81
Media Library /wp-admin/upload.php1,810 ▼05.02 ▲0.01153.99 ▲13.49126.38 ▲9.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script 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)
Even though no errors were found, this is by no means an exhaustive test

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 non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/nettantra-caldera-forms-mautic-integration/core.php
  • 92× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mautic\\Api\\Api' not found in wp-content/plugins/nettantra-caldera-forms-mautic-integration/vendor/mautic/api-library/lib/Api/CompanyFields.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/nettantra-caldera-forms-mautic-integration/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:14
    • > PHP Warning
      fwrite() expects parameter 1 to be resource, string given in wp-content/plugins/nettantra-caldera-forms-mautic-integration/vendor/mautic/api-library/tests/bootstrap.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Mautic\\Tests\\Api\\MauticApiTestCase' not found in wp-content/plugins/nettantra-caldera-forms-mautic-integration/vendor/mautic/api-library/tests/Api/NotificationsTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Mautic\\Tests\\Api\\MauticApiTestCase' not found in wp-content/plugins/nettantra-caldera-forms-mautic-integration/vendor/mautic/api-library/tests/Api/UsersTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/nettantra-caldera-forms-mautic-integration/vendor/mautic/api-library/tests/Api/MauticApiTestCase.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Mautic\\Api\\Api' not found in wp-content/plugins/nettantra-caldera-forms-mautic-integration/vendor/mautic/api-library/lib/Api/Stages.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Mautic\\Auth\\AuthInterface' not found in wp-content/plugins/nettantra-caldera-forms-mautic-integration/vendor/mautic/api-library/lib/Auth/AbstractAuth.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/nettantra-caldera-forms-mautic-integration/vendor/mautic/api-library/tests/QueryBuilder/WhereBuilderTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Mautic\\Api\\Contacts' not found in wp-content/plugins/nettantra-caldera-forms-mautic-integration/vendor/mautic/api-library/lib/Api/Leads.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: mautic integration, caldera api integration, mautic api integration, caldera forms

nettantra-caldera-forms-mautic-integration/core.php 92% from 13 tests

"NetTantra Caldera Forms - Mautic Integration" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nettantra-caldera-forms-mautic-integration.php" instead of "core.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin16,417 lines of code in 147 files:
LanguageFilesBlank linesComment linesLines of code
PHP1131,7343,7047,534
CSS59216,699
JavaScript45382001,393
JSON2000332
SVG100229
Markdown3830217
XML11013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.76
▷ Minimum class complexity1.00
▷ Maximum class complexity96.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces12
Interfaces3
Traits2
Classes101
▷ Abstract classes65.94%
▷ Concrete classes9594.06%
▷ Final classes00.00%
Methods639
▷ Static methods50.78%
▷ Public methods56187.79%
▷ Protected methods619.55%
▷ Private methods172.66%
Functions15
▷ Named functions426.67%
▷ Anonymous functions1173.33%
Constants18
▷ Global constants00.00%
▷ Class constants18100.00%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendor/mautic/api-library/tests/mauticlogo.png14.79KB6.48KB▼ 56.21%