84% ib-refer-me

Code Review | IB Refer Me

WordPress plugin IB Refer Me scored84%from 54 tests.

About plugin

  • Plugin page: ib-refer-me
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 31, 2022
  • Latest release: Apr 13, 2023
  • Number of updates: 10
  • Update frequency: every 10.4 days
  • Top authors: ibartsltd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /455 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.84ms] Passed 4 tests

Analyzing server-side resources used by IB Refer Me
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0836.05 ▼2.07
Dashboard /wp-admin3.38 ▲0.0442.77 ▼23.50
Posts /wp-admin/edit.php3.50 ▲0.1443.22 ▼2.44
Add New Post /wp-admin/post-new.php5.98 ▲0.1089.99 ▼2.97
Media Library /wp-admin/upload.php3.31 ▲0.0835.33 ▼2.43

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 25 new files
Database: 2 new tables, 6 new options
New tables
wp_ib_referral
wp_ib_contact_form
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for IB Refer Me
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8613.55 ▼0.712.11 ▲0.2340.62 ▼3.65
Dashboard /wp-admin2,234 ▲465.28 ▲0.38107.10 ▼14.5540.19 ▼3.47
Posts /wp-admin/edit.php2,096 ▲102.33 ▲0.2849.15 ▲12.2435.67 ▲1.81
Add New Post /wp-admin/post-new.php1,541 ▲823.28 ▲0.04631.84 ▼70.5069.96 ▼5.30
Media Library /wp-admin/upload.php1,416 ▲284.53 ▲0.35105.51 ▼3.9243.01 ▼3.55

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/ib-refer-me/admin/partials/ib-refer-me-admin-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/ib-refer-me/public/partials/contact-form.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/ib-refer-me/public/partials/ib-refer-me-public-display.php:46
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/ib-refer-me/public/partials/contact-form.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Submitting Referral Form.), #2 (After Submitting Referral Form Popup screen.), #3 (Contact Form screen.), #4 (After the Submission success message screen.)
You can take inspiration from this readme.txt

ib-refer-me/ib-refer-me.php Passed 13 tests

The entry point to "IB Refer Me" version 1.0.0 is a PHP file that has certain tags in its header comment area
73 characters long description:
This plugin is for a referral system which generate unique referral code.

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
Success! There were no dangerous files found in this plugin923 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13146538516
CSS3410267
JavaScript31713140

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.71
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods310.00%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin