10% dfd-reddcoin-tips

Code Review | DFD Reddcoin Tips

WordPress plugin DFD Reddcoin Tips scored 10% from 54 tests.

About plugin

  • Plugin page: dfd-reddcoin-tips
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4.2
  • WordPress version: 5.9.2
  • First release: Dec 5, 2014
  • Latest release: Feb 19, 2017
  • Number of updates: 21
  • Update frequency: every 38.3 days
  • Top authors: taoteh1221 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 808 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/dfd-reddcoin-tips/dfd-reddcoin-tips.php+19
    Undefined variable: _SESSION

Server metrics [RAM: ▼2.50MB] [CPU: ▼349.67ms] Passed 4 tests

This is a short check of server-side resources used by DFD Reddcoin Tips
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.87 ▼1.653.90 ▼51.91
Dashboard /wp-admin1.89 ▼1.524.59 ▼38.53
Posts /wp-admin/edit.php1.89 ▼1.755.55 ▼43.15
Add New Post /wp-admin/post-new.php1.89 ▼5.083.90 ▼1,265.07
Media Library /wp-admin/upload.php1.89 ▼1.419.29 ▼17.27
DFD Reddcoin Tips Settings /wp-admin/options-general.php?page=dfd-reddcoin-tips-settings1.894.92

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 448 new files
Database: no new tables, 2 new options
New WordPress options
widget_dfdrddtipwidget2
widget_dfdrddtipwidget1

Browser metrics Passed 4 tests

This is an overview of browser requirements for DFD Reddcoin Tips
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲4015.41 ▼0.295.61 ▼1.042.19 ▼0.59
Dashboard /wp-admin2,916 ▲586.16 ▼0.11116.68 ▼22.42176.03 ▲11.31
Posts /wp-admin/edit.php2,715 ▲213.23 ▲0.0197.53 ▲33.67154.25 ▲13.00
Add New Post /wp-admin/post-new.php1,838 ▲17719.25 ▲2.85409.94 ▼19.46202.29 ▼9.79
Media Library /wp-admin/upload.php1,791 ▲935.54 ▲0.07131.11 ▼6.67209.38 ▲21.68
DFD Reddcoin Tips Settings /wp-admin/options-general.php?page=dfd-reddcoin-tips-settings1,2082.3853.22280.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/dfd-reddcoin-tips/dfd-reddcoin-tips.php+19
    Undefined variable: _SESSION
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • widget_dfdrddtipwidget1
    • widget_dfdrddtipwidget2

Smoke tests 25% 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=dfd-reddcoin-tips-settings
    • > Notice in wp-content/plugins/dfd-reddcoin-tips/dfd-reddcoin-tips.php+19
    Undefined variable: _SESSION
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dfd-reddcoin-tips-settings
    • > Notice in wp-content/plugins/dfd-reddcoin-tips/includes/pages/settings/settings.php+149
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=dfd-reddcoin-tips-settings
    • > User deprecated in wp-includes/functions.php+5409
    The called constructor method for WP_Widget in dfd_rdd_tip_widget_1 is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=dfd-reddcoin-tips-settings
    • > User deprecated in wp-includes/functions.php+5409
    The called constructor method for WP_Widget in dfd_rdd_tip_widget_2 is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=dfd-reddcoin-tips-settings
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=dfd-reddcoin-tips-settings
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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 take a closer look at the following
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/dfd-reddcoin-tips/includes/pages/console/console_submissions.php
    • > /wp-content/plugins/dfd-reddcoin-tips/includes/pages/console/reddapi_connect.php
    • > /wp-content/plugins/dfd-reddcoin-tips/includes/addons/phpqrcode/index.php
    • > /wp-content/plugins/dfd-reddcoin-tips/includes/ajax/requests.php
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dfd-reddcoin-tips/includes/pages/console/reddapi_connect.php on line 4
    • > PHP Notice
      Undefined index: send_internal_to_username in wp-content/plugins/dfd-reddcoin-tips/includes/pages/console/console_submissions.php on line 88
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/dfd-reddcoin-tips/includes/pages/console/reddapi_connect.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dfd-reddcoin-tips/includes/functions/main_functions.php:365
    • > PHP Notice
      Undefined index: rdd_coin_address in wp-content/plugins/dfd-reddcoin-tips/assets/images/rdd-tip-address.php on line 4
    • > PHP Notice
      Undefined index: get_username_data in wp-content/plugins/dfd-reddcoin-tips/includes/pages/console/console_submissions.php on line 64
    • > PHP Notice
      Undefined index: send_internal_amount in wp-content/plugins/dfd-reddcoin-tips/includes/pages/console/console_submissions.php on line 87
    • > PHP Notice
      Undefined index: send_internal_from_username in wp-content/plugins/dfd-reddcoin-tips/includes/pages/console/console_submissions.php on line 89
    • > PHP Notice
      Undefined index: rdd_paid_usd in wp-content/plugins/dfd-reddcoin-tips/includes/ajax/requests.php on line 4
    • > PHP Notice
      Undefined index: username_create in wp-content/plugins/dfd-reddcoin-tips/includes/pages/console/console_submissions.php on line 43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

dfd-reddcoin-tips/dfd-reddcoin-tips.php 92% from 13 tests

Analyzing the main PHP file in "DFD Reddcoin Tips" version 1.1.1
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 349 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/dfd-reddcoin-tips/includes/addons/phpqrcode/tools/merge.bat
7,588 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP302,1082,2477,549
JavaScript1251235
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity30.97
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes36
▷ Abstract classes00.00%
▷ Concrete classes36100.00%
▷ Final classes00.00%
Methods391
▷ Static methods12231.20%
▷ Public methods28973.91%
▷ Protected methods9624.55%
▷ Private methods61.53%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants97
▷ Global constants97100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
43 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/addons/phpqrcode/cache/frame_8.png0.20KB0.19KB▼ 2.45%
includes/addons/phpqrcode/cache/frame_15.png0.21KB0.20KB▼ 4.57%
includes/addons/phpqrcode/cache/frame_18.png0.22KB0.21KB▼ 5.26%
includes/addons/phpqrcode/cache/frame_38.png0.27KB0.25KB▼ 8.24%
includes/addons/phpqrcode/cache/frame_36.png0.27KB0.25KB▼ 7.72%