80% iq-referral-program-for-woocommerce

Code Review | IQ Referral System for WooCommerce

WordPress plugin IQ Referral System for WooCommerce scored80%from 54 tests.

About plugin

  • Plugin page: iq-referral-progr...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Feb 23, 2023
  • Latest release: Feb 24, 2023
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: lumpx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /135 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by IQ Referral System for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.21 ▲4.45
Dashboard /wp-admin3.31 ▲0.0048.25 ▲3.82
Posts /wp-admin/edit.php3.36 ▲0.0046.81 ▼1.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.92 ▼9.67
Media Library /wp-admin/upload.php3.23 ▲0.0033.81 ▼2.55

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 80 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by IQ Referral System for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.50 ▼0.891.96 ▲0.3143.30 ▲4.07
Dashboard /wp-admin2,206 ▲214.87 ▼0.04102.45 ▼12.1839.88 ▼4.94
Posts /wp-admin/edit.php2,086 ▼32.04 ▲0.0434.61 ▼9.3233.61 ▼2.30
Add New Post /wp-admin/post-new.php1,533 ▲1323.08 ▼0.07660.99 ▲30.3464.49 ▲17.39
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.1497.18 ▼0.2943.58 ▲0.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: affiliate program, referral program, partners, affiliate system, referral system

iq-referral-program-for-woocommerce/iq-referral-program-for-woocommerce.php 92% from 13 tests

The main PHP file in "IQ Referral System for WooCommerce" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 508 characters long)

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
No dangerous file extensions were detected33,263 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
HTML12,097016,845
CSS72,138148,617
PHP405363405,307
SVG1002,105
PO File1215420385
JavaScript4004

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity24.25
▷ Minimum class complexity6.00
▷ Maximum class complexity52.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods57
▷ Static methods35.26%
▷ Public methods57100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/iq_logo.png8.85KB8.83KB0.21%
wizard/assets/img/okey.png4.77KB4.85KB0.00%