84% track-incoming-referrer

Code Review | track-incoming-referrer

WordPress plugin track-incoming-referrer scored84%from 54 tests.

About plugin

  • Plugin page: track-incoming-re...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.7
  • WordPress version: 6.3.1
  • First release: Jan 10, 2017
  • Latest release: Jan 10, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: averageradical (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,349 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.02ms] Passed 4 tests

A check of server-side resources used by track-incoming-referrer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.80 ▲1.24
Dashboard /wp-admin3.31 ▲0.0148.11 ▼1.27
Posts /wp-admin/edit.php3.36 ▲0.0149.79 ▲2.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.05 ▼20.21
Media Library /wp-admin/upload.php3.24 ▲0.0132.67 ▲0.17

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for track-incoming-referrer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.18 ▼1.422.96 ▲1.0039.57 ▼6.18
Dashboard /wp-admin2,206 ▲245.84 ▼0.01103.92 ▼0.5439.19 ▼3.04
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0539.51 ▼1.8536.40 ▲2.35
Add New Post /wp-admin/post-new.php1,528 ▲1418.33 ▲0.69625.60 ▼65.3249.42 ▼10.50
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0694.41 ▼10.6941.79 ▼1.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/track-incoming-referrer/track-incoming-referrer.php:90

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: referrer

track-incoming-referrer/track-incoming-referrer.php Passed 13 tests

The main PHP script in "track-incoming-referrer" version 1.0.0 is automatically included on every request by WordPress
93 characters long description:
Track incoming referrer and write it to any hidden form field with the identifier "referrer".

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
There were no executable files found in this plugin73 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181273

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin