68% klaive

Code Review | Klaive - Integrates Klaviyo with Give

WordPress plugin Klaive - Integrates Klaviyo with Give scored68%from 54 tests.

About plugin

  • Plugin page: klaive
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5
  • WordPress version: 6.3.1
  • First release: Mar 12, 2020
  • Latest release: Aug 15, 2020
  • Number of updates: 13
  • Update frequency: every 12.6 days
  • Top authors: mehul0810 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /530 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.16ms] Passed 4 tests

A check of server-side resources used by Klaive - Integrates Klaviyo with Give
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.21 ▼0.58
Dashboard /wp-admin3.34 ▼0.0046.58 ▼10.22
Posts /wp-admin/edit.php3.39 ▲0.0446.77 ▼5.45
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.02 ▼4.15
Media Library /wp-admin/upload.php3.26 ▲0.0335.96 ▼0.81

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 1,673 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Klaive - Integrates Klaviyo with Give: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.15 ▼1.301.70 ▼0.0943.30 ▲3.81
Dashboard /wp-admin2,235 ▲445.79 ▲0.89103.01 ▲0.3342.88 ▼2.09
Posts /wp-admin/edit.php2,121 ▲322.03 ▲0.0235.18 ▼5.7735.70 ▼3.58
Add New Post /wp-admin/post-new.php1,552 ▲3818.18 ▲0.66608.50 ▼62.1063.01 ▲8.68
Media Library /wp-admin/upload.php1,417 ▲294.22 ▲0.0396.38 ▼2.4742.09 ▼1.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/klaive/vendor/phpcompatibility/php-compatibility/phpunit-bootstrap.php
    • > /wp-content/plugins/klaive/vendor/squizlabs/php_codesniffer/scripts/build-phar.php
  • 746× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/klaive/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/klaive/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/klaive/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WordPressCS\\WordPress\\Sniff' not found in wp-content/plugins/klaive/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/NonceVerificationSniff.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/klaive/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPCompatibility\\AbstractComplexVersionSniff' not found in wp-content/plugins/klaive/vendor/phpcompatibility/php-compatibility/PHPCompatibility/Sniffs/FunctionUse/RequiredToOptionalFunctionParametersSniff.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/klaive/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WordPressCS\\WordPress\\Sniff' not found in wp-content/plugins/klaive/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/klaive/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/klaive/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
6 plugin tags: klaviyo, donation, donations, give, givewp...

klaive/klaive.php 92% from 13 tests

The main PHP file in "Klaive - Integrates Klaviyo with Give" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("4.8" instead of "5.2")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Almost there! Just fix the following issues
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/klaive/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat
      • wp-content/plugins/klaive/vendor/squizlabs/php_codesniffer/bin/phpcs.bat
110,218 lines of code in 1,317 files:
LanguageFilesBlank linesComment linesLines of code
PHP92021,88942,96692,014
XML1704297775,968
Pascal1112,4025,0995,092
Markdown1284803,291
JavaScript577658622,136
JSON1000902
CSS3318992665
XSD160130
DOS Batch241010
Sass12010

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 332)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity16.54
▷ Minimum class complexity1.00
▷ Maximum class complexity480.00
Average method complexity6.13
▷ Minimum method complexity1.00
▷ Maximum method complexity332.00
Code structure
Namespaces193
Interfaces3
Traits1
Classes774
▷ Abstract classes202.58%
▷ Concrete classes75497.42%
▷ Final classes20.27%
Methods2,376
▷ Static methods853.58%
▷ Public methods1,90580.18%
▷ Protected methods37515.78%
▷ Private methods964.04%
Functions9
▷ Named functions222.22%
▷ Anonymous functions777.78%
Constants136
▷ Global constants10375.74%
▷ Class constants3324.26%
▷ Public constants33100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin