83% referralcandy-for-woocommerce

Code Review | ReferralCandy for WooCommerce

WordPress plugin ReferralCandy for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: referralcandy-for...
  • Plugin version: 2.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 23, 2015
  • Latest release: Nov 15, 2023
  • Number of updates: 57
  • Update frequency: every 52.2 days
  • Top authors: referralcandy (100%)

Code review

54 tests

User reviews

194 reviews

Install metrics

600+ active /26,083 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.81ms] Passed 4 tests

This is a short check of server-side resources used by ReferralCandy for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0133.30 ▼3.64
Dashboard /wp-admin3.32 ▲0.0244.63 ▼8.64
Posts /wp-admin/edit.php3.38 ▲0.0149.55 ▲2.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0188.30 ▼6.71
Media Library /wp-admin/upload.php3.25 ▲0.0132.37 ▼4.25

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for ReferralCandy for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.24 ▼0.111.60 ▼0.1338.96 ▼3.85
Dashboard /wp-admin2,198 ▲185.49 ▼0.1192.82 ▼8.5340.38 ▼5.90
Posts /wp-admin/edit.php2,106 ▲61.94 ▼0.0141.11 ▲1.3738.42 ▲1.53
Add New Post /wp-admin/post-new.php1,532 ▲122.96 ▼0.16635.04 ▼70.3667.36 ▲12.41
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0999.26 ▼13.3646.67 ▲1.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/referralcandy-for-woocommerce/includes/class-wc-referralcandy-integration.php
    • > /wp-content/plugins/referralcandy-for-woocommerce/woocommerce-referralcandy.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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:
  • Screenshots: Add descriptions for screenshots #2, #3, #4 in referralcandy-for-woocommerce/assets to your readme.txt
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can look at the official readme.txt

referralcandy-for-woocommerce/woocommerce-referralcandy.php 85% from 13 tests

The principal PHP file in "ReferralCandy for WooCommerce" v. 2.4.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("referralcandy-for-woocommerce.php" instead of "woocommerce-referralcandy.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin465 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP37453465

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity18.00
▷ Minimum class complexity2.00
▷ Maximum class complexity30.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1780.95%
▷ Protected methods00.00%
▷ Private methods419.05%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin