89% affiliate-disclosure-for-woocommerce

Code Review | Affiliate Disclosure for WooCommerce

WordPress plugin Affiliate Disclosure for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: affiliate-disclos...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.1
  • WordPress version: 6.3.1
  • First release: Feb 7, 2020
  • Latest release: Nov 13, 2022
  • Number of updates: 16
  • Update frequency: every 63.1 days
  • Top authors: WPExplorer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,760 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by Affiliate Disclosure for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.01 ▼4.41
Dashboard /wp-admin3.37 ▲0.0652.97 ▼3.61
Posts /wp-admin/edit.php3.42 ▲0.0654.62 ▲1.08
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.56 ▼5.39
Media Library /wp-admin/upload.php3.29 ▲0.0635.24 ▼2.04

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/affiliate-disclosure-for-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Affiliate Disclosure for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.27 ▼0.941.82 ▼0.0242.44 ▼2.25
Dashboard /wp-admin2,218 ▲125.80 ▲0.8796.88 ▼19.7339.32 ▼2.51
Posts /wp-admin/edit.php2,103 ▲32.05 ▲0.0539.44 ▲2.3437.28 ▲2.30
Add New Post /wp-admin/post-new.php1,545 ▲1923.16 ▲5.33648.68 ▼20.7856.13 ▼0.54
Media Library /wp-admin/upload.php1,397 ▼04.26 ▲0.0294.84 ▼3.9644.73 ▼2.62

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

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
Attributes that require attention: The official readme.txt might help

affiliate-disclosure-for-woocommerce/affiliate-disclosure-for-woocommerce.php Passed 13 tests

This is the main PHP file of "Affiliate Disclosure for WooCommerce" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
90 characters long description:
Display a custom disclosure text on your WooCommerce external/affiliate (or all) products.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin244 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26468244

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin