90% referralyard

Code Review | ReferralYard

WordPress plugin ReferralYard scored90%from 54 tests.

About plugin

  • Plugin page: referralyard
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-5.5.0
  • WordPress version: 6.3.1
  • First release: Sep 3, 2020
  • Latest release: Dec 14, 2020
  • Number of updates: 18
  • Update frequency: every 5.7 days
  • Top authors: referralyard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /571 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by ReferralYard
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.40 ▼0.49
Dashboard /wp-admin3.31 ▲0.0043.46 ▼4.81
Posts /wp-admin/edit.php3.36 ▲0.0043.57 ▼4.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.98 ▼10.88
Media Library /wp-admin/upload.php3.23 ▲0.0032.19 ▼2.38

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for ReferralYard
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.60 ▼0.831.64 ▼0.2643.87 ▲4.77
Dashboard /wp-admin2,203 ▲185.83 ▼0.0497.46 ▼5.1738.07 ▼5.18
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0636.11 ▼3.0732.90 ▼5.57
Add New Post /wp-admin/post-new.php1,514 ▼617.62 ▼5.78674.36 ▲4.0055.88 ▲4.62
Media Library /wp-admin/upload.php1,385 ▼34.25 ▲0.07103.85 ▼4.4146.66 ▲0.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
5 plugin tags: referral program, referrals, referralyard, loyalty, rewards

referralyard/woocommerce-referralyard.php 92% from 13 tests

The principal PHP file in "ReferralYard" v. 1.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("referralyard.php" instead of "woocommerce-referralyard.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin316 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24467315
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo.png21.29KB4.47KB▼ 79.01%