10% referral-system-for-users-oop

Code Review | Referral-system-IVD

WordPress plugin Referral-system-IVD scored10%from 54 tests.

About plugin

  • Plugin page: referral-system-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 8, 2018
  • Latest release: Oct 9, 2018
  • Number of updates: 18
  • Update frequency: every 0.3 days
  • Top authors: vanjok (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /605 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/referral-system-for-users-oop/lib/class-safety.php+19
    Function create_function() is deprecated

Server metrics [RAM: ▼1.87MB] [CPU: ▼50.07ms] Passed 4 tests

An overview of server-side resources used by Referral-system-IVD
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.348.28 ▼36.26
Dashboard /wp-admin2.14 ▼1.1611.91 ▼45.10
Posts /wp-admin/edit.php2.14 ▼1.2212.64 ▼38.29
Add New Post /wp-admin/post-new.php2.14 ▼3.7512.22 ▼80.63
Media Library /wp-admin/upload.php2.14 ▼1.0913.98 ▼24.61
Referral-system-IVD /wp-admin/options-general.php?page=id_referral_sites2.1413.30

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Referral-system-IVD
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,620 ▼11513.27 ▼1.111.16 ▼0.7336.58 ▼10.63
Dashboard /wp-admin2,196 ▲55.83 ▲0.96115.80 ▲13.8546.66 ▲2.03
Posts /wp-admin/edit.php2,088 ▼42.03 ▲0.0339.95 ▼2.9235.15 ▼0.17
Add New Post /wp-admin/post-new.php1,531 ▼1123.37 ▲4.90666.27 ▲59.7157.38 ▲3.88
Media Library /wp-admin/upload.php1,378 ▼104.21 ▼0.0195.75 ▼4.8341.87 ▼3.13
Referral-system-IVD /wp-admin/options-general.php?page=id_referral_sites9862.0228.4127.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/referral-system-for-users-oop/lib/class-safety.php+19
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=id_referral_sites
    • > Deprecated in wp-content/plugins/referral-system-for-users-oop/lib/class-safety.php+19
    Function create_function() is deprecated

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/referral-system-for-users-oop/lib/class-sms-verif.php:18

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 86% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Admin panel), #2 (Settings page), #3 (Settings page)
You can take inspiration from this readme.txt

referral-system-for-users-oop/index.php 77% from 13 tests

The principal PHP file in "Referral-system-IVD" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("referral-system-for-users-oop.php" instead of "index.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin741 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6497138592
JavaScript392118
CSS10031

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity11.60
▷ Minimum class complexity9.00
▷ Maximum class complexity18.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes240.00%
Methods39
▷ Static methods00.00%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin