72% journey-analytics

Code Review | Journey Analytics

WordPress plugin Journey Analytics scored 72% from 54 tests.

About plugin

  • Plugin page: journey-analytics
  • Plugin version: 1.0.15
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.9.2
  • First release: Apr 21, 2020
  • Latest release: Jul 23, 2021
  • Number of updates: 25
  • Update frequency: every 18.3 days
  • Top authors: mbordash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 637 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▼295.07ms] Passed 4 tests

Server-side resources used by Journey Analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.2555.18 ▲2.32
Dashboard /wp-admin3.63 ▲0.2238.17 ▲3.82
Posts /wp-admin/edit.php3.85 ▲0.2142.75 ▲6.51
Add New Post /wp-admin/post-new.php7.09 ▲0.12101.46 ▼1,182.77
Media Library /wp-admin/upload.php3.52 ▲0.2126.87 ▼3.63
Journey Funnel /wp-admin/admin.php?page=kontxt_journeys_funnel3.4925.89
Journey Points /wp-admin/admin.php?page=kontxt_journeys_points3.4924.34
Journey Flow /wp-admin/admin.php?page=kontxt_journeys3.4923.69
Settings & Help /wp-admin/admin.php?page=kontxt_journeys_settings3.5026.25

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 38 new files
Database: no new tables, 4 new options
New WordPress options
KONTXT_JOURNEYS_apikey
kontxt_allowable_html
KONTXT_JOURNEYS_optin
KONTXT_JOURNEYS_apiuid

Browser metrics Passed 4 tests

An overview of browser requirements for Journey Analytics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,144 ▲40024.92 ▲9.3319.24 ▲11.702.48 ▲0.51
Dashboard /wp-admin3,038 ▲17712.94 ▲6.79231.36 ▲100.30159.96 ▼1.79
Posts /wp-admin/edit.php2,844 ▲15012.13 ▲8.89133.05 ▲68.35136.02 ▼6.67
Add New Post /wp-admin/post-new.php1,728 ▼3021.02 ▼1.17548.70 ▲111.10193.55 ▲35.14
Media Library /wp-admin/upload.php1,844 ▲14614.95 ▲9.47200.67 ▲54.61186.12 ▼9.06
Journey Funnel /wp-admin/admin.php?page=kontxt_journeys_funnel1,73012.53145.70119.81
Journey Points /wp-admin/admin.php?page=kontxt_journeys_points1,88911.74193.79135.31
Journey Flow /wp-admin/admin.php?page=kontxt_journeys1,62511.97130.07111.21
Settings & Help /wp-admin/admin.php?page=kontxt_journeys_settings1,62211.67123.98112.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 uninstall procedure has failed, leaving 4 options in the database
    • KONTXT_JOURNEYS_apikey
    • KONTXT_JOURNEYS_optin
    • kontxt_allowable_html
    • KONTXT_JOURNEYS_apiuid

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kontxt_journeys
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/journey-analytics/admin/class-kontxt-JourneysAdmin.php+119
    Undefined index: security

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 fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/journey-analytics/app.ini.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/journey-analytics/admin/partials/kontxt-journey-funnel.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/journey-analytics/admin/partials/kontxt-journey-flow.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/journey-analytics/admin/partials/kontxt-journey-points.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/journey-analytics/admin/partials/kontxt-banner.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/journey-analytics/admin/partials/kontxt-admin-display.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

journey-analytics/kontxt-journeys.php 85% from 13 tests

"Journey Analytics" version 1.0.15's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("journey-analytics.php" instead of "kontxt-journeys.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin3,321 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS348571,256
PHP165706421,163
JavaScript429075902

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods52
▷ Static methods23.85%
▷ Public methods4688.46%
▷ Protected methods00.00%
▷ Private methods611.54%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-icons_777777_256x240.png6.94KB4.18KB▼ 39.78%
admin/css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
admin/css/images/ui-icons_cc0000_256x240.png4.57KB4.18KB▼ 8.43%
admin/css/images/ui-icons_ffffff_256x240.png6.33KB4.18KB▼ 33.99%
admin/css/images/ui-icons_444444_256x240.png6.92KB4.18KB▼ 39.61%