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 ) scored78%from 54 tests.

About plugin

  • Plugin page: affiliate-marketing
  • Plugin version: 1.1.20
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2021
  • Latest release: Jul 15, 2023
  • Number of updates: 17
  • Update frequency: every 47.9 days
  • Top authors: sdelka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /470 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: ▼3.24ms] 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 /3.58 ▲0.1239.87 ▲2.79
Dashboard /wp-admin3.41 ▲0.1145.48 ▼5.47
Posts /wp-admin/edit.php3.52 ▲0.1753.61 ▲7.04
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.80 ▼8.30
Media Library /wp-admin/upload.php3.33 ▲0.1034.32 ▼1.97

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, 13 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
sdelka_termlink
widget_recent-posts
sdelka_user_exist
sdelka_ssid
widget_sdelka_widget
sdelka_login
sdelka_apikey
db_upgraded
...

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,025 ▲26413.53 ▼0.91568.22 ▲566.5837.14 ▼4.32
Dashboard /wp-admin2,232 ▲605.51 ▼0.1383.06 ▼16.1587.30 ▲46.61
Posts /wp-admin/edit.php2,152 ▲521.99 ▼0.0232.90 ▼3.2633.24 ▲0.79
Add New Post /wp-admin/post-new.php1,573 ▲4523.00 ▼0.08695.45 ▲10.3752.08 ▼2.80
Media Library /wp-admin/upload.php1,449 ▲524.19 ▼0.0194.48 ▼10.8267.50 ▲22.85

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 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_sdelka_widget
    • db_upgraded
    • theysaidso_admin_options

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: sdelka, affiliate, social buttons, referral plugin, social media share...

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

The main file in "Affiliate program for your website ( integration with Sdelka.biz )" v. 1.1.20 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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("affiliate-marketing.php" instead of "sdelka.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: The description should be shorter than 140 characters (currently 181 characters long)

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