78% user-sync-for-klaviyo

Code Review | User Sync For Klaviyo

WordPress plugin User Sync For Klaviyo scored78%from 54 tests.

About plugin

  • Plugin page: user-sync-for-kla...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 11, 2023
  • Latest release: Oct 29, 2023
  • Number of updates: 10
  • Update frequency: every 14.5 days
  • Top authors: oakandbeechdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /133 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
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼4.24ms] Passed 4 tests

An overview of server-side resources used by User Sync For Klaviyo
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.73 ▼1.73
Dashboard /wp-admin3.41 ▲0.1150.45 ▼1.49
Posts /wp-admin/edit.php3.53 ▲0.1749.67 ▲4.04
Add New Post /wp-admin/post-new.php6.01 ▲0.1382.67 ▼14.91
Media Library /wp-admin/upload.php3.34 ▲0.1135.36 ▲1.16

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

User Sync For Klaviyo: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.35 ▼0.001.76 ▲0.1144.69 ▼1.62
Dashboard /wp-admin2,217 ▲405.65 ▲0.0298.28 ▼1.1141.69 ▼0.65
Posts /wp-admin/edit.php2,119 ▲192.02 ▲0.0636.52 ▼4.9533.45 ▼4.35
Add New Post /wp-admin/post-new.php1,543 ▲723.31 ▲0.20672.16 ▲37.5751.93 ▲2.42
Media Library /wp-admin/upload.php1,419 ▲194.23 ▲0.0497.62 ▲0.2042.94 ▼0.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/user-sync-for-klaviyo/public/partials/user-sync-for-klaviyo-public-display.php
    • > /wp-content/plugins/user-sync-for-klaviyo/trunk/public/partials/user-sync-for-klaviyo-public-display.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/user-sync-for-klaviyo/trunk/admin/partials/user-sync-for-klaviyo-admin-display.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/user-sync-for-klaviyo/admin/partials/user-sync-for-klaviyo-admin-display.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (The settings page of the plugin), #2 (The information synced by the plugin)
Please take inspiration from this readme.txt

user-sync-for-klaviyo/user-sync-for-klaviyo.php Passed 13 tests

The entry point to "User Sync For Klaviyo" version 1.1.0 is a PHP file that has certain tags in its header comment area
77 characters long description:
This plugin allows you to sync your WordPress Users and their data to Klaviyo

Code Analysis Passed 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 plugin878 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12145561576
CSS2208138
JavaScript21636105
Markdown130059

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.71
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods88
▷ Static methods44.55%
▷ Public methods7281.82%
▷ Protected methods00.00%
▷ Private methods1618.18%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin