84% affiliatewp-external-referral-links

Code Review | AffiliateWP - External Referral Links

WordPress plugin AffiliateWP - External Referral Links scored 84% from 54 tests.

About plugin

  • Plugin page: affiliatewp-exter...
  • 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 28, 2015
  • Latest release: Jun 6, 2022
  • Number of updates: 21
  • Update frequency: every 122.2 days
  • Top authors: sumobi (47.62%)DrewAPicture (28.57%)dbeja (23.81%)tubiz (9.52%)paninapress (9.52%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 13,463 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 gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.21ms] Passed 4 tests

Server-side resources used by AffiliateWP - External Referral Links
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0734.29 ▼4.43
Dashboard /wp-admin3.41 ▲0.1045.24 ▼3.86
Posts /wp-admin/edit.php3.52 ▲0.1745.95 ▼5.18
Add New Post /wp-admin/post-new.php5.99 ▲0.1084.17 ▼11.38
Media Library /wp-admin/upload.php3.33 ▲0.1035.52 ▲1.10
External Referral Links /wp-admin/options-general.php?page=external-referral-links3.3031.59

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options
affwp_erl_version
widget_recent-posts
can_compress_scripts
db_upgraded
affiliatewp_external_referral_links
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

AffiliateWP - External Referral Links: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.17 ▼1.211.69 ▼0.4337.34 ▼7.99
Dashboard /wp-admin2,210 ▲255.84 ▲0.02104.47 ▲3.8239.82 ▼5.89
Posts /wp-admin/edit.php2,096 ▲71.97 ▼0.0437.75 ▲1.7136.38 ▲2.77
Add New Post /wp-admin/post-new.php1,517 ▼1217.69 ▼0.53718.87 ▲94.5257.42 ▲4.65
Media Library /wp-admin/upload.php1,392 ▲44.20 ▲0.00104.24 ▼5.2148.42 ▲0.26
External Referral Links /wp-admin/options-general.php?page=external-referral-links8292.0226.6428.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • affiliatewp_external_referral_links
    • affwp_erl_version
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/affiliatewp-external-referral-links/includes/admin.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt might help

affiliatewp-external-referral-links/affiliatewp-external-referral-links.php Passed 13 tests

The main file in "AffiliateWP - External Referral Links" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
106 characters long description:
Allows you to promote external landing pages/sites with the affiliate ID or username appended to the URLs.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,048 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP6236912701
JavaScript47651248
PO File2222594
Markdown1305

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.20
▷ Minimum class complexity4.00
▷ Maximum class complexity13.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes240.00%
▷ Concrete classes360.00%
▷ Final classes133.33%
Methods77
▷ Static methods11.30%
▷ Public methods3748.05%
▷ Protected methods2228.57%
▷ Private methods1823.38%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin