89% woocommerce-cloak-affiliate-links

Code Review | WooCommerce Cloak Affiliate Links

WordPress plugin WooCommerce Cloak Affiliate Links scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-cloak...
  • Plugin version: 1.0.33
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0+
  • WordPress version: 6.3.1
  • First release: Dec 21, 2013
  • Latest release: Nov 10, 2023
  • Number of updates: 106
  • Update frequency: every 34.1 days
  • Top authors: datafeedr.com (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /41,164 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.46ms] Passed 4 tests

A check of server-side resources used by WooCommerce Cloak Affiliate Links
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.03 ▼1.96
Dashboard /wp-admin3.34 ▼0.0044.30 ▼11.22
Posts /wp-admin/edit.php3.46 ▲0.1042.49 ▼6.28
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.46 ▼0.87
Media Library /wp-admin/upload.php3.26 ▲0.0333.66 ▼2.38
WC Cloak Links /wp-admin/options-general.php?page=wccal-options3.2328.78

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
wccal_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Cloak Affiliate Links
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.27 ▼0.081.69 ▼0.0239.26 ▲2.37
Dashboard /wp-admin2,202 ▲305.64 ▼0.0488.90 ▼28.9338.82 ▼1.63
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0536.22 ▼1.3334.22 ▲4.03
Add New Post /wp-admin/post-new.php1,529 ▲323.11 ▼0.17630.57 ▼69.7751.97 ▲1.04
Media Library /wp-admin/upload.php1,398 ▲44.18 ▼0.0198.46 ▲0.8142.36 ▲0.43
WC Cloak Links /wp-admin/options-general.php?page=wccal-options8312.0224.5127.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • wccal_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Tested up to: Version format is invalid
Please take inspiration from this readme.txt

woocommerce-cloak-affiliate-links/woocommerce-cloak-affiliate-links.php Passed 13 tests

Analyzing the main PHP file in "WooCommerce Cloak Affiliate Links" version 1.0.33
50 characters long description:
Cloak your WooCommerce external & affiliate links.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected261 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP368135261

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity14.50
▷ Minimum class complexity2.00
▷ Maximum class complexity27.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods14.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin