73% refpress

Code Review | RefPress - Affiliates Manager Plugin

WordPress plugin RefPress - Affiliates Manager Plugin scored73%from 54 tests.

About plugin

  • Plugin page: refpress
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: May 11, 2021
  • Latest release: Sep 23, 2021
  • Number of updates: 5
  • Update frequency: every 32.6 days
  • Top authors: themeqx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /450 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.59MB] [CPU: ▼1.94ms] Passed 4 tests

This is a short check of server-side resources used by RefPress - Affiliates Manager Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6446.21 ▲4.59
Dashboard /wp-admin3.93 ▲0.5855.80 ▼11.50
Posts /wp-admin/edit.php3.98 ▲0.6252.69 ▲4.20
Add New Post /wp-admin/post-new.php6.47 ▲0.58102.07 ▼5.05
Media Library /wp-admin/upload.php3.79 ▲0.5647.72 ▲10.32
RefPress 0 /wp-admin/admin.php?page=refpress3.8144.72
Payout History /wp-admin/admin.php?page=refpress-payout-history3.8048.53
Accounts /wp-admin/admin.php?page=refpress-accounts3.8240.84
All Traffic /wp-admin/admin.php?page=refpress-traffic3.7837.49
Settings /wp-admin/admin.php?page=refpress-settings3.9039.58
Referral Earnings /wp-admin/admin.php?page=refpress-referrals3.8037.25

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 56 new files
Database: 5 new tables, 8 new options
New tables
wp_refpress_earnings
wp_refpress_payouts
wp_refpress_traffics
wp_refpress_logs
wp_refpress_accounts
New WordPress options
widget_theysaidso_widget
widget_recent-comments
refpress_version
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
refpress_settings

Browser metrics Passed 4 tests

An overview of browser requirements for RefPress - Affiliates Manager Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲18513.93 ▼0.569.57 ▲8.0242.17 ▼1.95
Dashboard /wp-admin2,254 ▲774.93 ▼0.6898.09 ▲2.4341.32 ▼0.06
Posts /wp-admin/edit.php2,159 ▲592.45 ▲0.4733.67 ▼3.4331.17 ▼3.91
Add New Post /wp-admin/post-new.php1,574 ▲4823.28 ▲0.00652.25 ▼35.9060.28 ▲1.34
Media Library /wp-admin/upload.php1,459 ▲594.45 ▲0.25111.84 ▲10.5446.47 ▲4.73
RefPress 0 /wp-admin/admin.php?page=refpress9433.4273.0345.38
Payout History /wp-admin/admin.php?page=refpress-payout-history9491.8827.9128.40
Accounts /wp-admin/admin.php?page=refpress-accounts1,0261.9224.3936.51
All Traffic /wp-admin/admin.php?page=refpress-traffic1,0001.9226.6629.00
Settings /wp-admin/admin.php?page=refpress-settings2,5602.3745.2959.23
Referral Earnings /wp-admin/admin.php?page=refpress-referrals1,0021.8825.9930.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 5 tables
    • wp_refpress_payouts
    • wp_refpress_accounts
    • wp_refpress_traffics
    • wp_refpress_earnings
    • wp_refpress_logs
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • refpress_settings
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • refpress_version
    • theysaidso_admin_options

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/refpress/includes/functions-hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'RefPress\\Includes\\Admin\\TrafficList' not found in wp-content/plugins/refpress/includes/admin/traffic/traffic.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/refpress/includes/admin/settings/panel.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function refpress_get_payout_methods() in wp-content/plugins/refpress/includes/admin/payout/configure.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'RefPress\\Includes\\Admin\\PayoutList' not found in wp-content/plugins/refpress/includes/admin/payout/payouts.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'RefPress\\Includes\\Admin\\CommissionsList' not found in wp-content/plugins/refpress/includes/admin/accounts/referrals.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'RefPress\\Includes\\Admin\\AccountsList' not found in wp-content/plugins/refpress/includes/admin/accounts/list.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Overview of affiliates) image missing
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

refpress/refpress.php 92% from 13 tests

The primary PHP file in "RefPress - Affiliates Manager Plugin" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.5" instead of "4.7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin7,041 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP431,7141,5025,464
CSS578521,175
JavaScript48563387
SVG10015

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.81
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods117
▷ Static methods21.71%
▷ Public methods117100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions84
▷ Named functions8196.43%
▷ Anonymous functions33.57%
Constants6
▷ Global constants6100.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.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/join-promote-earn.png55.60KB25.88KB▼ 53.46%