89% affiliates-woocommerce-light

Code Review | Affiliates WooCommerce Light

WordPress plugin Affiliates WooCommerce Light scored89%from 54 tests.

About plugin

  • Plugin page: affiliates-woocom...
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.4-6.2
  • WordPress version: 6.3.1
  • First release: Jan 15, 2012
  • Latest release: Jun 28, 2023
  • Number of updates: 71
  • Update frequency: every 58.9 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active /117,439 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.70ms] Passed 4 tests

A check of server-side resources used by Affiliates WooCommerce Light
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.68 ▲0.83
Dashboard /wp-admin3.39 ▲0.0847.28 ▲1.14
Posts /wp-admin/edit.php3.44 ▲0.0849.81 ▲2.74
Add New Post /wp-admin/post-new.php5.97 ▲0.0882.88 ▼11.13
Media Library /wp-admin/upload.php3.31 ▲0.0836.10 ▲2.36

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Affiliates WooCommerce Light
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10713.24 ▼1.501.73 ▼0.2041.07 ▼1.68
Dashboard /wp-admin2,220 ▲325.85 ▲0.94101.33 ▼40.3443.42 ▲1.12
Posts /wp-admin/edit.php2,105 ▲132.05 ▲0.0339.42 ▼2.5936.89 ▼1.89
Add New Post /wp-admin/post-new.php1,531 ▼1217.85 ▼4.94683.72 ▲82.6470.74 ▲7.20
Media Library /wp-admin/upload.php1,399 ▲84.21 ▼0.03101.27 ▼2.0341.42 ▼1.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Referral rate setting - Here, a referral rate set at 0.25 credits affiliates with 25% commissions on sales.), #2 (Referrals created automatically for sales - Each referral is linked to its order.)
  • Tags: Please reduce the number of tags, currently 31 tag instead of maximum 10
The official readme.txt is a good inspiration

affiliates-woocommerce-light/affiliates-woocommerce-light.php 85% from 13 tests

Analyzing the main PHP file in "Affiliates WooCommerce Light" version 2.1.0
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("6.0" instead of "7.4")

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
Everything looks great! No dangerous files found in this plugin448 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP145181347
PO File11823101

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity77.00
▷ Minimum class complexity77.00
▷ Maximum class complexity77.00
Average method complexity7.33
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods12100.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png40.07KB15.03KB▼ 62.49%
screenshot-1.png12.10KB5.61KB▼ 53.61%