10% simple-click-tracker-lite

Code Review | Simple Click Tracker Lite

WordPress plugin Simple Click Tracker Lite scored10%from 54 tests.

About plugin

  • Plugin page: simple-click-trac...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 7, 2022
  • Latest release: Aug 15, 2023
  • Number of updates: 12
  • Update frequency: every 44.8 days
  • Top authors: maximize (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,661 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/simple-click-tracker-lite/app/Sct_Admin.php+8
    Constant SCT_SITE_PATH already defined

Server metrics [RAM: ▼1.27MB] [CPU: ▼43.47ms] Passed 4 tests

An overview of server-side resources used by Simple Click Tracker Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.44 ▼1.025.86 ▼32.25
Dashboard /wp-admin2.83 ▼0.4717.76 ▼31.72
Posts /wp-admin/edit.php2.83 ▼0.5221.90 ▼29.02
Add New Post /wp-admin/post-new.php2.83 ▼3.0617.78 ▼80.90
Media Library /wp-admin/upload.php2.83 ▼0.4016.25 ▼21.35

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 143 new files
Database: 9 new tables, 7 new options
New tables
wp_sct_domain
wp_sct_user_join
wp_sct_funnel_link
wp_sct_funnel_link_new
wp_sct_click
wp_sct_link
wp_sct_404_log
wp_sct_funnel
wp_sct_group
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
rlm_version_simple_click_tracker

Browser metrics Passed 4 tests

A check of browser resources used by Simple Click Tracker Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,091 ▲33015.60 ▲1.226.83 ▲4.9738.46 ▼5.42
Dashboard /wp-admin2,372 ▲1926.38 ▲0.76103.99 ▲15.7739.21 ▼4.85
Posts /wp-admin/edit.php2,303 ▲2033.50 ▲1.5354.59 ▲17.9635.06 ▲0.15
Add New Post /wp-admin/post-new.php1,550 ▲2423.35 ▲0.17595.38 ▼95.1634.15 ▼22.42
Media Library /wp-admin/upload.php1,447 ▲444.40 ▲0.2079.23 ▼24.2542.09 ▼2.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/simple-click-tracker-lite/s3_click_tracker_functions.php+7
    Undefined index: page
  • Zombie tables detected upon uninstall: 9 tables
    • wp_sct_user_join
    • wp_sct_domain
    • wp_sct_click
    • wp_sct_group
    • wp_sct_funnel_link_new
    • wp_sct_funnel
    • wp_sct_404_log
    • wp_sct_link
    • wp_sct_funnel_link
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • rlm_version_simple_click_tracker
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simple-click-tracker-lite/app/sites/ajax/link_save.php
    • > /wp-content/plugins/simple-click-tracker-lite/app/sites/public/views/settings.php
    • > /wp-content/plugins/simple-click-tracker-lite/app/sites/public/views/unknown_user.php
  • 37× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/simple-click-tracker-lite/app/sites/admin/views/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/simple-click-tracker-lite/app/sites/public/actions/group_quick_add.php:8
    • > PHP Notice
      Undefined index: redirect in wp-content/plugins/simple-click-tracker-lite/app/sites/ajax/redirect.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Sct_Base' not found in wp-content/plugins/simple-click-tracker-lite/app/sites/public/snippets/summary_report.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Sct_Base' not found in wp-content/plugins/simple-click-tracker-lite/app/sites/public/actions/default.php:2
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/simple-click-tracker-lite/app/sites/public/actions/funnel_save.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Sct_Base' not found in wp-content/plugins/simple-click-tracker-lite/app/sites/public/snippets/nav.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Sct_Base' not found in wp-content/plugins/simple-click-tracker-lite/app/sites/public/views/group_grid.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/simple-click-tracker-lite/app/sites/public/actions/link_save.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Sct_Base' not found in wp-content/plugins/simple-click-tracker-lite/app/sites/public/views/report_summary.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (https://namstoolkit.com/pluginupdater/sct_screenshot/screen-1.png) image not found
You can take inspiration from this readme.txt

simple-click-tracker-lite/simple_click_tracker.php 92% from 13 tests

The main file in "Simple Click Tracker Lite" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-click-tracker-lite.php" instead of "simple_click_tracker.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .jar - Java Archive in Firefox, IE, Chrome, Safari
      • wp-content/plugins/simple-click-tracker-lite/includes/tablesorter/build/js.jar
21,960 lines of code in 87 files:
LanguageFilesBlank linesComment linesLines of code
CSS182,18623812,590
PHP41399945,492
JavaScript225066253,529
SVG100229
HTML24067
Markdown210035
Ant15318

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity34.33
▷ Minimum class complexity3.00
▷ Maximum class complexity84.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods70
▷ Static methods6795.71%
▷ Public methods70100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
28 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/flexigrid/css/images/magnifier.png0.60KB0.60KB0.00%
includes/icons/cog.png0.50KB0.83KB0.00%
includes/icons/bricks.png0.81KB0.83KB0.00%
includes/flexigrid/css/images/ddn.png0.11KB0.11KB0.00%
includes/icons/arrow_up.png2.84KB0.17KB▼ 93.92%