84% store-referrals-woocommerce

Code Review | Store Referrals for WooCommerce

WordPress plugin Store Referrals for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: store-referrals-w...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Dec 19, 2016
  • Latest release: May 15, 2017
  • Number of updates: 16
  • Update frequency: every 8.9 days
  • Top authors: storereferrals (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

An overview of server-side resources used by Store Referrals for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.67 ▼1.46
Dashboard /wp-admin3.31 ▲0.0146.37 ▼0.66
Posts /wp-admin/edit.php3.36 ▲0.0148.36 ▲0.41
Add New Post /wp-admin/post-new.php5.89 ▲0.01122.24 ▲20.97
Media Library /wp-admin/upload.php3.24 ▲0.0135.97 ▲1.44

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Store Referrals for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.191.61 ▼0.0741.16 ▼4.65
Dashboard /wp-admin2,203 ▲125.81 ▲0.8695.27 ▼10.6139.23 ▼3.67
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0137.26 ▼4.3634.48 ▼1.37
Add New Post /wp-admin/post-new.php1,547 ▲3318.21 ▲0.69674.79 ▲34.7762.52 ▲9.16
Media Library /wp-admin/upload.php1,385 ▼34.23 ▲0.0699.10 ▼6.2941.74 ▼2.96

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected 'public' (T_PUBLIC) in wp-content/plugins/store-referrals-woocommerce/wc-store-referrals-integration.php on line 57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/store-referrals-woocommerce/store-referrals-woocommerce.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
8 plugin tags: refer, reward, referrer, referral marketing, referral program...

store-referrals-woocommerce/store-referrals-woocommerce.php Passed 13 tests

"Store Referrals for WooCommerce" version 1.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
95 characters long description:
Store Referrals allows you to create, manage, and track multiple campaigns with tiered rewards.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin82 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2111582

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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