90% affiliatewp-woocommerce-redirect-affiliates

Code Review | AffiliateWP - WooCommerce Redirect Affiliates

WordPress plugin AffiliateWP - WooCommerce Redirect Affiliates scored90%from 54 tests.

About plugin

  • Plugin page: affiliatewp-wooco...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: May 22, 2014
  • Latest release: Jun 3, 2022
  • Number of updates: 15
  • Update frequency: every 195.6 days
  • Top authors: DrewAPicture (40%)dbeja (33.33%)sumobi (33.33%)tubiz (13.33%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /17,609 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.05MB] [CPU: ▼4.74ms] Passed 4 tests

Analyzing server-side resources used by AffiliateWP - WooCommerce Redirect Affiliates
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.19 ▼1.34
Dashboard /wp-admin3.36 ▲0.0651.79 ▼11.28
Posts /wp-admin/edit.php3.47 ▲0.1254.70 ▼0.77
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.30 ▼5.55
Media Library /wp-admin/upload.php3.28 ▲0.0541.57 ▲1.59

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for AffiliateWP - WooCommerce Redirect Affiliates
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.72 ▲0.441.88 ▲0.2640.88 ▼3.86
Dashboard /wp-admin2,198 ▲185.52 ▼0.1185.60 ▼1.8142.18 ▲2.63
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0040.25 ▲0.0838.98 ▲0.55
Add New Post /wp-admin/post-new.php1,529 ▲322.98 ▼0.09675.12 ▼4.1858.61 ▲11.46
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.10104.29 ▼9.3747.51 ▼1.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can look at the official readme.txt

affiliatewp-woocommerce-redirect-affiliates/affiliatewp-woocommerce-redirect-affiliates.php Passed 13 tests

This is the main PHP file of "AffiliateWP - WooCommerce Redirect Affiliates" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
94 characters long description:
Redirect affiliates to their affiliate area when they login via WooCommerce's /my-account page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected628 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6214954628

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.80
▷ Minimum class complexity5.00
▷ Maximum class complexity13.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes240.00%
▷ Concrete classes360.00%
▷ Final classes133.33%
Methods73
▷ Static methods45.48%
▷ Public methods2939.73%
▷ Protected methods2432.88%
▷ Private methods2027.40%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin