78% affiliate-marketing

Code Review | Affiliate program for your website ( integration with Sdelka.biz )

WordPress plugin Affiliate program for your website ( integration with Sdelka.biz ) scored 78% from 54 tests.

About plugin

  • Plugin page: affiliate-marketing
  • Plugin version: 1.1.19
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.1
  • WordPress version: 5.8.1
  • First release: Apr 23, 2021
  • Latest release: Oct 20, 2021
  • Number of updates: 16
  • Update frequency: every 11.3 days
  • Top authors: sdelka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 135 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
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼141.65ms] Passed 4 tests

This is a short check of server-side resources used by Affiliate program for your website ( integration with Sdelka.biz )
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2139.39 ▲15.57
Dashboard /wp-admin3.16 ▲0.1058.76 ▲20.00
Posts /wp-admin/edit.php3.27 ▲0.1649.18 ▲4.14
Add New Post /wp-admin/post-new.php5.51 ▲0.0894.01 ▼587.02
Media Library /wp-admin/upload.php3.10 ▲0.1035.85 ▲0.70

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
sdelka_termlink
sdelka_js_path
sdelka_apikey
sdelka_ssid
sdelka_login
widget_sdelka_widget
sdelka_user_exist

Browser metrics Passed 4 tests

A check of browser resources used by Affiliate program for your website ( integration with Sdelka.biz )
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,762 ▲16715.75 ▲0.298.12 ▼4.1353.99 ▲4.48
Dashboard /wp-admin3,015 ▲845.90 ▼0.04156.77 ▲11.43164.48 ▲48.14
Posts /wp-admin/edit.php2,809 ▲732.70 ▲0.0173.37 ▲5.5495.58 ▼2.43
Add New Post /wp-admin/post-new.php2,129 ▲44624.76 ▲6.04373.34 ▼19.29112.30 ▲4.58
Media Library /wp-admin/upload.php1,880 ▲704.99 ▼0.05139.87 ▼5.69144.79 ▲21.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_sdelka_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/affiliate-marketing/public/partials/sdelka-public-display.php
    • > /wp-content/plugins/affiliate-marketing/admin/partials/sdelka-admin-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/affiliate-marketing/includes/class-sdelka-widget.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: affiliate, sdelka, affiliate program, referral plugin, social buttons...

affiliate-marketing/sdelka.php 77% from 13 tests

The main file in "Affiliate program for your website ( integration with Sdelka.biz )" v. 1.1.19 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 181 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("affiliate-marketing.php" instead of "sdelka.php")

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 detected482 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12171571426
PO File191131
SVG10022
CSS1133

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.62
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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