68% gotcha-user-centric-analytics-triggers-driven-by-micro-surveys

Code Review | Gotcha: User-centric analytics & triggers, driven by micro surveys

WordPress plugin Gotcha: User-centric analytics & triggers, driven by micro surveys scored68%from 54 tests.

About plugin

  • Plugin page: gotcha-user-centr...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 16, 2017
  • Latest release: Feb 20, 2017
  • Number of updates: 10
  • Update frequency: every 0.4 days
  • Top authors: gotchaio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /977 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼33.28ms] Passed 4 tests

Server-side resources used by Gotcha: User-centric analytics & triggers, driven by micro surveys
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.29 ▼6.21
Dashboard /wp-admin3.00 ▼0.3024.00 ▼19.14
Posts /wp-admin/edit.php3.00 ▼0.3525.60 ▼23.99
Add New Post /wp-admin/post-new.php3.00 ▼2.8822.65 ▼79.08
Media Library /wp-admin/upload.php3.00 ▼0.2322.67 ▼10.89
Gotcha.io /wp-admin/options-general.php?page=gotcha-user-centric-analytics-triggers-driven-by-micro-surveys/gotcha-plugin.php3.0022.89

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

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

Browser metrics Passed 4 tests

Gotcha: User-centric analytics & triggers, driven by micro surveys: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8913.19 ▼1.182.47 ▲0.7943.53 ▲3.94
Dashboard /wp-admin2,210 ▲215.84 ▼0.08106.13 ▼16.4041.04 ▼7.15
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0542.29 ▲0.9835.74 ▲0.03
Add New Post /wp-admin/post-new.php1,517 ▼2517.72 ▼0.63666.98 ▲29.2054.27 ▲3.01
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.0595.82 ▼1.6842.11 ▲1.18
Gotcha.io /wp-admin/options-general.php?page=gotcha-user-centric-analytics-triggers-driven-by-micro-surveys/gotcha-plugin.php9622.0223.2029.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=gotcha-user-centric-analytics-triggers-driven-by-micro-surveys/gotcha-plugin.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gotcha-user-centric-analytics-triggers-driven-by-micro-surveys/gotcha-plugin.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: growth hacking, analytics, marketing, surveys, users...

gotcha-user-centric-analytics-triggers-driven-by-micro-surveys/gotcha-plugin.php 92% from 13 tests

The principal PHP file in "Gotcha: User-centric analytics & triggers, driven by micro surveys" v. 1.5 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gotcha-user-centric-analytics-triggers-driven-by-micro-surveys.php" instead of "gotcha-plugin.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
There were no executable files found in this plugin66 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1151965
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 4.76MB with 2.52MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.82KB1.19KB▼ 34.64%
screenshot-2.png172.87KB45.86KB▼ 73.47%
images/icon-big.png11.81KB6.93KB▼ 41.32%
screenshot-1.png4,686.36KB1,753.34KB▼ 62.59%