84% connect-wp-posthog-com-integration

Code Review | Connect WP - PostHog.com Integration

WordPress plugin Connect WP - PostHog.com Integration scored84%from 54 tests.

About plugin

  • Plugin page: connect-wp-postho...
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Oct 20, 2022
  • Latest release: Oct 24, 2022
  • Number of updates: 8
  • Update frequency: every 0.5 days
  • Top authors: saadcodes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /233 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Connect WP - PostHog.com Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.91 ▼6.97
Dashboard /wp-admin3.33 ▲0.0347.09 ▼3.86
Posts /wp-admin/edit.php3.38 ▲0.0250.47 ▼2.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.41 ▲5.04
Media Library /wp-admin/upload.php3.25 ▲0.0235.64 ▼3.78
Connect WP-PostHog Settings /wp-admin/options-general.php?page=posthog-settings3.2232.59

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Connect WP - PostHog.com Integration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▼0.111.92 ▼0.0443.51 ▼0.08
Dashboard /wp-admin2,210 ▲224.86 ▼1.02108.32 ▼8.6441.47 ▼3.46
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0340.76 ▲1.2635.10 ▲1.19
Add New Post /wp-admin/post-new.php1,536 ▲2223.31 ▲5.45653.29 ▼40.0754.79 ▲1.37
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.0394.85 ▼14.8344.32 ▼3.01
Connect WP-PostHog Settings /wp-admin/options-general.php?page=posthog-settings8372.0324.4431.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/connect-wp-posthog-com-integration/connect-wp-posthog-com-integration.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: post hog, posthogcom, posthog, posthog wordpress integration, posthog integration

connect-wp-posthog-com-integration/connect-wp-posthog-com-integration.php Passed 13 tests

The primary PHP file in "Connect WP - PostHog.com Integration" version 1.3 is used by WordPress to initiate all plugin functionality
99 characters long description:
Simple, lightweight solution for inserting your PostHog.com Snippet code to your WordPress website.

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
Everything looks great! No dangerous files found in this plugin79 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2281579

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin