83% cross-domain-tracker-for-affiliatewp

Code Review | Cross Domain Tracker for AffiliateWP

WordPress plugin Cross Domain Tracker for AffiliateWP scored83%from 54 tests.

About plugin

  • Plugin page: cross-domain-trac...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 6.3.1
  • First release: May 28, 2019
  • Latest release: Jul 14, 2021
  • Number of updates: 13
  • Update frequency: every 60.3 days
  • Top authors: brainstormworg (46.15%)patilvikasj (46.15%)brainstormforce (23.08%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /3,998 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Cross Domain Tracker for AffiliateWP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.39 ▲0.11
Dashboard /wp-admin3.33 ▲0.0349.07 ▲0.84
Posts /wp-admin/edit.php3.38 ▲0.0251.61 ▼2.53
Add New Post /wp-admin/post-new.php5.91 ▲0.0299.58 ▲10.45
Media Library /wp-admin/upload.php3.25 ▲0.0235.75 ▼2.55
Cross Domain Tracker for AffiliateWP /wp-admin/options-general.php?page=external-visits3.2236.47

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Cross Domain Tracker for AffiliateWP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.70 ▲0.271.86 ▲0.2742.37 ▼5.65
Dashboard /wp-admin2,193 ▲135.57 ▼0.0284.46 ▼5.2341.52 ▼3.04
Posts /wp-admin/edit.php2,107 ▲71.96 ▼0.0240.68 ▲0.4236.22 ▼1.53
Add New Post /wp-admin/post-new.php1,540 ▲518.01 ▼0.20643.59 ▼46.8166.91 ▼3.26
Media Library /wp-admin/upload.php1,401 ▲14.18 ▼0.04104.75 ▼5.9846.65 ▲2.72
Cross Domain Tracker for AffiliateWP /wp-admin/options-general.php?page=external-visits9552.0526.3430.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • cdtawp_settings
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following
  • 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/cross-domain-tracker-for-affiliatewp/includes/class-affiliate-wp-track-external-visits.php:597

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: Please take inspiration from this readme.txt

cross-domain-tracker-for-affiliatewp/cross-domain-tracker-for-affiliatewp.php 69% from 13 tests

Analyzing the main PHP file in "Cross Domain Tracker for AffiliateWP" version 1.0.4
The following require your attention:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.4" instead of "3.0")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected571 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3145272472
JavaScript211099

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity36.00
▷ Minimum class complexity32.00
▷ Maximum class complexity40.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods31
▷ Static methods13.23%
▷ Public methods2787.10%
▷ Protected methods00.00%
▷ Private methods412.90%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
PNG images were not found in this plugin