90% yektanet-affiliate

Code Review | Chavosh Affiliate

WordPress plugin Chavosh Affiliate scored90%from 54 tests.

About plugin

  • Plugin page: yektanet-affiliate
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8
  • WordPress version: 6.3.1
  • First release: Apr 13, 2021
  • Latest release: Jul 29, 2021
  • Number of updates: 16
  • Update frequency: every 6.8 days
  • Top authors: affiliatenetworks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /632 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 successfully, without throwing any errors or notices

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

Server-side resources used by Chavosh Affiliate
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.58 ▲2.50
Dashboard /wp-admin3.37 ▲0.0349.15 ▼17.37
Posts /wp-admin/edit.php3.42 ▲0.0750.82 ▼4.06
Add New Post /wp-admin/post-new.php5.95 ▲0.0786.08 ▼5.41
Media Library /wp-admin/upload.php3.30 ▲0.0737.92 ▲4.30

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Chavosh Affiliate
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.35 ▼0.961.71 ▼0.0245.11 ▲2.91
Dashboard /wp-admin2,203 ▲215.85 ▼0.0196.44 ▼11.0839.17 ▼2.83
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0235.61 ▼3.6032.22 ▼5.11
Add New Post /wp-admin/post-new.php1,533 ▼023.06 ▼0.24651.29 ▼67.7358.81 ▼3.23
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.04100.17 ▼2.4147.93 ▲4.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 errors were detected

Optimizations

Plugin configuration Passed 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
1 plugin tags: woocommerce

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

"Chavosh Affiliate" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
67 characters long description:
chavosh woocommerce plugin to send purchase data to chavosh servers

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected526 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP37846526

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions32
▷ Named functions3093.75%
▷ Anonymous functions26.25%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected