10% track-page-scroll

Code Review | Track Page Scroll

WordPress plugin Track Page Scroll scored 10% from 54 tests.

About plugin

  • Plugin page: track-page-scroll
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.5
  • WordPress version: 6.3.1
  • First release: Apr 22, 2016
  • Latest release: May 23, 2016
  • Number of updates: 24
  • Update frequency: every 1.3 days
  • Top authors: mndpsingh287 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active / 5,373 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/track-page-scroll/trackpage.php+60
    include(inc/install.php): failed to open stream: No such file or directory

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

This is a short check of server-side resources used by Track Page Scroll
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.33 ▼4.40
Dashboard /wp-admin3.32 ▲0.0248.52 ▼4.04
Posts /wp-admin/edit.php3.37 ▲0.0247.27 ▼6.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.24 ▼16.12
Media Library /wp-admin/upload.php3.25 ▲0.0237.97 ▼4.42
Add New /wp-admin/admin.php?page=addnewtrackpage3.2831.72
Settings /wp-admin/admin.php?page=trackpage_settings3.2428.60
Track Page Scroll /wp-admin/admin.php?page=trackpage3.3128.64
Upgrade To Pro /wp-admin/admin.php?page=trackpage_upgrade_pro3.2630.05

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Track Page Scroll
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲12513.30 ▼0.652.56 ▲0.6439.59 ▼14.80
Dashboard /wp-admin2,239 ▲514.87 ▼0.03107.36 ▼6.1635.49 ▼6.72
Posts /wp-admin/edit.php2,122 ▲332.05 ▲0.0839.00 ▼2.7532.19 ▼3.71
Add New Post /wp-admin/post-new.php1,704 ▲17624.81 ▲6.65638.35 ▼46.5463.50 ▲9.48
Media Library /wp-admin/upload.php1,421 ▲334.27 ▼0.03105.60 ▼13.7846.23 ▼5.86
Add New /wp-admin/admin.php?page=addnewtrackpage8692.1924.7223.44
Settings /wp-admin/admin.php?page=trackpage_settings8222.1324.4525.65
Track Page Scroll /wp-admin/admin.php?page=trackpage1,0582.2548.3547.30
Upgrade To Pro /wp-admin/admin.php?page=trackpage_upgrade_pro8132.0623.1427.33

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • track_page_scroll_options2

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=trackpage_upgrade_pro
    • > Notice in wp-content/plugins/track-page-scroll/inc/upgrade_pro.php+8
    Undefined index: _wpnonce
    • > GET request to /wp-admin/admin.php?page=trackpage_upgrade_pro
    • > Notice in wp-content/plugins/track-page-scroll/inc/upgrade_pro.php+59
    Undefined index: licence_key_track_page_scroll

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/track-page-scroll/inc/shortcode.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/track-page-scroll/trackpage.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/track-page-scroll/inc/shortcode.php:3
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/track-page-scroll/trackpage.php on line 31

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 93% from 29 tests

readme.txt Passed 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
4 plugin tags: scrolling time, click events, measure reading time, page tracking

track-page-scroll/trackpage.php 85% from 13 tests

"Track Page Scroll" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("track-page-scroll.php" instead of "trackpage.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected2,103 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52763321,268
PHP71870567
SVG100229
CSS40539

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/edit.png0.36KB0.27KB▼ 25.75%
inc/img/del.png1.17KB1.18KB0.00%