68% affiliate-link-tracker

Code Review | Affiliate Link Tracker

WordPress plugin Affiliate Link Tracker scored68%from 54 tests.

About plugin

  • Plugin page: affiliate-link-tr...
  • Plugin version: 0.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2020
  • Latest release: Sep 16, 2020
  • Number of updates: 7
  • Update frequency: every 22.1 days
  • Top authors: seoseon (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /1,749 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.83ms] Passed 4 tests

An overview of server-side resources used by Affiliate Link Tracker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.41 ▼5.20
Dashboard /wp-admin3.37 ▲0.0652.04 ▼4.34
Posts /wp-admin/edit.php3.42 ▲0.0658.63 ▲4.25
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.08 ▼9.14
Media Library /wp-admin/upload.php3.29 ▲0.0636.60 ▼0.63
Affiliate Links /wp-admin/options-general.php?page=aff_lnk_options3.2534.57

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Affiliate Link Tracker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.72 ▲0.311.54 ▼0.8437.46 ▼5.92
Dashboard /wp-admin2,201 ▲215.64 ▲0.0793.75 ▲0.2144.48 ▲0.19
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0242.59 ▲2.2137.15 ▼0.39
Add New Post /wp-admin/post-new.php1,539 ▲1018.42 ▼4.73644.30 ▼39.4268.73 ▼11.21
Media Library /wp-admin/upload.php1,409 ▲94.26 ▲0.0797.49 ▼7.1440.81 ▼3.89
Affiliate Links /wp-admin/options-general.php?page=aff_lnk_options9942.0024.3031.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/affiliate-link-tracker/affiliate-link-tracker.php+248
    Undefined index: utm_source
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/affiliate-link-tracker/affiliate-link-tracker.php:29

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=aff_lnk_options
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=aff_lnk_options 140:32 Uncaught SyntaxError: Unexpected token '='

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt might help

affiliate-link-tracker/affiliate-link-tracker.php Passed 13 tests

The primary PHP file in "Affiliate Link Tracker" version 0.2 is used by WordPress to initiate all plugin functionality
88 characters long description:
Advanced affiliate link tracker for tracking where your affiliate conversions come from.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected234 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11325234

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected