83% amb-variable-affiliate-products-for-woocommerce

Code Review | AMB Variable Affiliate Products for WooCommerce

WordPress plugin AMB Variable Affiliate Products for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: amb-variable-affi...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 23, 2018
  • Latest release: Aug 24, 2023
  • Number of updates: 12
  • Update frequency: every 145.2 days
  • Top authors: ambmills (66.67%)wpguild (41.67%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /6,954 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.89ms] Passed 4 tests

A check of server-side resources used by AMB Variable Affiliate Products for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.03 ▼5.00
Dashboard /wp-admin3.31 ▲0.0049.96 ▼0.90
Posts /wp-admin/edit.php3.36 ▲0.0049.26 ▼4.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.34 ▼1.43
Media Library /wp-admin/upload.php3.23 ▲0.0036.93 ▲0.89

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for AMB Variable Affiliate Products for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.29 ▼0.331.75 ▼0.7844.94 ▼6.35
Dashboard /wp-admin2,195 ▲155.56 ▼0.0985.49 ▼11.3544.69 ▲0.70
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0739.91 ▲1.6637.41 ▲3.01
Add New Post /wp-admin/post-new.php1,535 ▲918.36 ▼4.62669.34 ▲22.5671.88 ▲9.49
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0298.27 ▼12.3542.93 ▼5.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/amb-variable-affiliate-products-for-woocommerce/amb-wooco-variable-affiliate-products.php
    • > /wp-content/plugins/amb-variable-affiliate-products-for-woocommerce/includes/amb-wcvap-functions.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: external variable products, variable affiliate products, products, variable products, affiliate products...

amb-variable-affiliate-products-for-woocommerce/amb-wooco-variable-affiliate-products.php 77% from 13 tests

This is the main PHP file of "AMB Variable Affiliate Products for WooCommerce" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9.8" instead of "3.5.0")
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("amb-variable-affiliate-products-for-woocommerce.php" instead of "amb-wooco-variable-affiliate-products.php")

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 plugin364 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP27033316
JavaScript12036
CSS1209
Markdown1203

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity28.00
▷ Minimum class complexity2.00
▷ Maximum class complexity54.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected