72% refiral

Code Review | Refiral

WordPress plugin Refiral scored72%from 54 tests.

About plugin

  • Plugin page: refiral
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Mar 19, 2014
  • Latest release: Aug 8, 2015
  • Number of updates: 20
  • Update frequency: every 25.4 days
  • Top authors: refiral (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /2,350 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.20ms] Passed 4 tests

Server-side resources used by Refiral
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0340.39 ▼0.42
Dashboard /wp-admin3.33 ▲0.0346.31 ▼3.84
Posts /wp-admin/edit.php3.38 ▲0.0347.68 ▼3.58
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.47 ▼0.97
Media Library /wp-admin/upload.php3.25 ▲0.0334.23 ▲0.68
Refiral /wp-admin/options-general.php?page=refiral-options3.2231.49

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
refiral

Browser metrics Passed 4 tests

Refiral: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.27 ▼1.121.58 ▼0.2741.55 ▼1.42
Dashboard /wp-admin2,204 ▲135.79 ▲0.93102.41 ▼13.6341.82 ▼4.73
Posts /wp-admin/edit.php2,093 ▲252.00 ▼0.0138.78 ▲2.2436.47 ▲1.45
Add New Post /wp-admin/post-new.php1,516 ▼1722.50 ▼0.71665.20 ▲55.2758.52 ▲7.52
Media Library /wp-admin/upload.php1,395 ▲44.20 ▲0.0199.07 ▼0.8044.54 ▲1.13
Refiral /wp-admin/options-general.php?page=refiral-options7842.0626.6524.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • refiral
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/refiral/refiral.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/refiral/refiral_options.php:41

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=refiral-options
    • > Network (severe)
    http://cdn.refiral.com/main/images/logo.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (34 tag instead of maximum 10)
Please take inspiration from this readme.txt

refiral/refiral.php 92% from 13 tests

This is the main PHP file of "Refiral" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 177 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
Success! There were no dangerous files found in this plugin199 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22234199

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin