89% affiliate-power

Code Review | Affiliate Power - Sales Tracking for Affiliate Marketers

WordPress plugin Affiliate Power - Sales Tracking for Affiliate Marketers scored 89% from 54 tests.

About plugin

  • Plugin page: affiliate-power
  • Plugin version: 2.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 5.8.1
  • First release: Oct 29, 2012
  • Latest release: Sep 9, 2021
  • Number of updates: 88
  • Update frequency: every 36.8 days
  • Top authors: JonasBreuer (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active / 25,961 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼141.60ms] Passed 4 tests

Analyzing server-side resources used by Affiliate Power - Sales Tracking for Affiliate Marketers
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1436.02 ▲10.00
Dashboard /wp-admin3.13 ▲0.0840.04 ▼1.63
Posts /wp-admin/edit.php3.18 ▲0.0743.46 ▼1.66
Add New Post /wp-admin/post-new.php5.49 ▲0.0585.49 ▼565.51
Media Library /wp-admin/upload.php3.07 ▲0.0735.39 ▲2.41
Leads / Sales /wp-admin/admin.php?page=affiliate-power3.1230.83
Settings /wp-admin/admin.php?page=affiliate-power-settings3.0429.81
Statistics /wp-admin/admin.php?page=affiliate-power-statistics3.0539.72

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 31 new files
Database: 1 new table, 3 new options
New tables
wp_ap_transaction
New WordPress options
affiliate-power-options
affiliate-power-version
affiliate-power-meta-options

Browser metrics Passed 4 tests

Checking browser requirements for Affiliate Power - Sales Tracking for Affiliate Marketers
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,869 ▲27316.15 ▲0.1910.62 ▲1.8645.87 ▼6.20
Dashboard /wp-admin3,126 ▲1926.45 ▲0.41129.14 ▼11.57147.07 ▲43.29
Posts /wp-admin/edit.php2,807 ▲682.74 ▲0.0267.28 ▼3.2683.93 ▼11.17
Add New Post /wp-admin/post-new.php1,535 ▼6918.89 ▲0.23374.30 ▲7.64109.12 ▼0.71
Media Library /wp-admin/upload.php1,804 ▼65.12 ▲0.11127.79 ▼17.94145.22 ▲31.80
Leads / Sales /wp-admin/admin.php?page=affiliate-power1,4152.3953.4971.27
Settings /wp-admin/admin.php?page=affiliate-power-settings1,6302.3967.7497.27
Statistics /wp-admin/admin.php?page=affiliate-power-statistics1,4652.6259.2686.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% 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 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/affiliate-power/csv-download.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined index: affiliate-power-csv in wp-content/plugins/affiliate-power/csv-download.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: affiliate marketing, awin, tracking, financeads, sales

affiliate-power/affiliate-power.php Passed 13 tests

The main file in "Affiliate Power - Sales Tracking for Affiliate Marketers" v. 2.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
131 characters long description:
Import all your affiliate sales into your WordPress Backend. Analyze which posts, merchants and campaigns are creating your income.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,454 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP197852402,378
JavaScript3204876

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity21.74
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity5.18
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods94
▷ Static methods7175.53%
▷ Public methods8489.36%
▷ Protected methods00.00%
▷ Private methods1010.64%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants19
▷ Global constants1894.74%
▷ Class constants15.26%
▷ Public constants1100.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
4 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/affiliate-power-premium.png46.75KB12.72KB▼ 72.80%
img/affiliate-power-36.png4.28KB1.65KB▼ 61.42%
img/affiliate-power-16.png3.34KB0.88KB▼ 73.60%
img/affiliate-power-ebook.png35.36KB12.18KB▼ 65.54%