84% associate-products-for-woocommerce

Code Review | Associate products for woocommerce

WordPress plugin Associate products for woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: associate-product...
  • Plugin version: 1.1
  • PHP compatiblity: 7.2.29+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.9
  • WordPress version: 6.3.1
  • First release: Apr 4, 2022
  • Latest release: Sep 27, 2022
  • Number of updates: 4
  • Update frequency: every 45.3 days
  • Top authors: roshan28 (75%)roshanrathod0137 (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /733 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.25ms] Passed 4 tests

An overview of server-side resources used by Associate products for woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.23 ▼0.52
Dashboard /wp-admin3.33 ▲0.0246.10 ▼4.73
Posts /wp-admin/edit.php3.38 ▲0.0248.93 ▲0.31
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.80 ▼19.75
Media Library /wp-admin/upload.php3.25 ▲0.0233.21 ▼0.00
Associate products settings /wp-admin/options-general.php?page=associate-products-plugin3.1930.02

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Associate products for woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲6013.31 ▼0.982.12 ▲0.3144.54 ▲3.77
Dashboard /wp-admin2,210 ▲224.84 ▼0.97108.04 ▼9.0338.44 ▼10.20
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0239.31 ▲3.2735.52 ▼0.48
Add New Post /wp-admin/post-new.php1,536 ▲1723.53 ▲0.30676.40 ▲1.1960.47 ▼4.39
Media Library /wp-admin/upload.php1,392 ▲74.16 ▼0.0596.99 ▼2.2441.95 ▼2.80
Associate products settings /wp-admin/options-general.php?page=associate-products-plugin7762.0624.0226.88

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=associate-products-plugin
    • > Notice in wp-content/plugins/associate-products-for-woocommerce/associate-products-for-woocommerce.php+61
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: You can take inspiration from this readme.txt

associate-products-for-woocommerce/associate-products-for-woocommerce.php Passed 13 tests

The main PHP script in "Associate products for woocommerce" version 1.1 is automatically included on every request by WordPress
105 characters long description:
This Plugin shows associate(related) products using shortcode. Plugin will show products using shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin95 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1223295

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.13
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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