10% wp-referral-light

Code Review | WordPress Referral Lite

WordPress plugin WordPress Referral Lite scored10%from 54 tests.

About plugin

  • Plugin page: wp-referral-light
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Aug 26, 2013
  • Latest release: Jun 7, 2015
  • Number of updates: 28
  • Update frequency: every 23.2 days
  • Top authors: markessence (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /6,637 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/wp-referral-light/wp-referral-lite.php+13
    Undefined index: ref

Server metrics [RAM: ▼1.92MB] [CPU: ▼50.63ms] Passed 4 tests

Server-side resources used by WordPress Referral Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.11 ▼35.55
Dashboard /wp-admin2.08 ▼1.226.29 ▼40.38
Posts /wp-admin/edit.php2.08 ▼1.275.77 ▼39.26
Add New Post /wp-admin/post-new.php2.08 ▼3.806.34 ▼87.31
Media Library /wp-admin/upload.php2.08 ▼1.145.81 ▼26.68

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Referral Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.55 ▼0.695.04 ▲3.3040.44 ▼3.52
Dashboard /wp-admin2,209 ▲214.83 ▼1.0598.24 ▼21.5840.47 ▼8.26
Posts /wp-admin/edit.php2,089 ▼01.96 ▼0.0839.85 ▲3.9335.94 ▼3.80
Add New Post /wp-admin/post-new.php1,540 ▲2623.41 ▲5.90607.92 ▼78.3756.89 ▼6.05
Media Library /wp-admin/upload.php1,391 ▲34.27 ▲0.1197.12 ▼2.9742.13 ▼6.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wp-referral-light/wp-referral-lite.php+13
    Undefined index: ref
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 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 50% from 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
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: ref in wp-content/plugins/wp-referral-light/trunk/wp-referral-lite.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-referral-light/wp-referral-lite.php:21
    • > PHP Notice
      Undefined index: ref in wp-content/plugins/wp-referral-light/wp-referral-lite.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-referral-light/trunk/wp-referral-lite.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #2 (Users listing screenshot2.png.)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-referral-light === )
You can look at the official readme.txt

wp-referral-light/wp-referral-lite.php 85% from 13 tests

This is the main PHP file of "WordPress Referral Lite" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 189 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-referral-light.php" instead of "wp-referral-lite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin76 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111676

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin