68% refersion-for-woocommerce

Code Review | Refersion for WooCommerce

WordPress plugin Refersion for WooCommerce scored68%from 54 tests.

About plugin

  • Plugin page: refersion-for-woo...
  • Plugin version: 4.10.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 26, 2014
  • Latest release: Oct 31, 2023
  • Number of updates: 76
  • Update frequency: every 46.1 days
  • Top authors: refersion (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /16,571 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼7.87ms] Passed 4 tests

A check of server-side resources used by Refersion for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.6121.05 ▼21.41
Dashboard /wp-admin3.33 ▲0.0345.07 ▼7.49
Posts /wp-admin/edit.php3.38 ▲0.0348.57 ▲3.44
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.88 ▼0.52
Media Library /wp-admin/upload.php3.26 ▲0.0333.79 ▼2.05
Refersion /wp-admin/admin.php?page=refersion-setting-admin3.2230.85

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: 1 new table, 6 new options
New tables
wp_refersion_cart_tracking
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Refersion for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.35 ▲0.001.76 ▲0.0143.49 ▲2.31
Dashboard /wp-admin2,200 ▲235.62 ▲0.0990.14 ▼13.3539.08 ▼6.28
Posts /wp-admin/edit.php2,108 ▲82.03 ▲0.0940.37 ▲4.7936.47 ▲0.40
Add New Post /wp-admin/post-new.php1,545 ▲1918.28 ▼5.22608.95 ▼96.2966.39 ▲12.59
Media Library /wp-admin/upload.php1,408 ▲84.28 ▲0.0595.43 ▼13.9142.89 ▼1.90
Refersion /wp-admin/admin.php?page=refersion-setting-admin1,0502.3227.6727.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_refersion_cart_tracking
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/refersion-for-woocommerce/refersion.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=refersion-setting-admin
    • > Network (severe)
    wp-content/plugins/refersion-for-woocommerce/refersion_by_pantastic_logo.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: influencer, refersion, marketing, affiliate, woocommerce...

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

The primary PHP file in "Refersion for WooCommerce" version 4.10.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("refersion-for-woocommerce.php" instead of "refersion.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected888 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3395315840
JavaScript44229
CSS14019

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity60.50
▷ Minimum class complexity47.00
▷ Maximum class complexity74.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods43
▷ Static methods4297.67%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
refersion_logo.png5.62KB3.54KB▼ 36.97%