84% widget-xrptipbot

Code Review | XRPTIPBOT Widget by HBENSLAMA

WordPress plugin XRPTIPBOT Widget by HBENSLAMA scored 84% from 54 tests.

About plugin

  • Plugin page: widget-xrptipbot
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 5.9.2
  • First release: Nov 11, 2018
  • Latest release: Nov 11, 2018
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: houssembenslama (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 359 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.01MB] [CPU: ▼295.28ms] Passed 4 tests

This is a short check of server-side resources used by XRPTIPBOT Widget by HBENSLAMA
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0252.31 ▲2.17
Dashboard /wp-admin3.42 ▲0.0132.82 ▼0.48
Posts /wp-admin/edit.php3.65 ▲0.0136.81 ▲0.47
Add New Post /wp-admin/post-new.php6.89 ▼0.0888.02 ▼1,180.21
Media Library /wp-admin/upload.php3.30 ▲0.0124.31 ▼0.91

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
widget_xrptipbot_widget

Browser metrics Passed 4 tests

Checking browser requirements for XRPTIPBOT Widget by HBENSLAMA
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲7316.01 ▲0.426.13 ▲0.732.95 ▲0.62
Dashboard /wp-admin2,895 ▲376.07 ▼0.08113.49 ▼18.42153.32 ▼10.57
Posts /wp-admin/edit.php2,691 ▼33.25 ▲0.0162.53 ▼1.72136.34 ▼11.16
Add New Post /wp-admin/post-new.php1,752 ▲5621.87 ▲0.04427.48 ▲5.61158.83 ▲5.81
Media Library /wp-admin/upload.php1,701 ▲95.53 ▼0.01140.53 ▲3.90189.93 ▲1.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_xrptipbot_widget

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
Even though everything seems fine, this is not 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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/widget-xrptipbot/class.xrptipbot-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/widget-xrptipbot/xrptipbot-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: micro-payments, widget, xrptipbot, interledger, web-monetized...

widget-xrptipbot/xrptipbot-widget.php 92% from 13 tests

The entry point to "XRPTIPBOT Widget by HBENSLAMA" version 1.0.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("widget-xrptipbot.php" instead of "xrptipbot-widget.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
Good job! No executable or dangerous file extensions detected86 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2153986

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png76.15KB21.28KB▼ 72.05%
screenshot-2.png24.41KB6.65KB▼ 72.76%
screenshot-1.png28.88KB7.79KB▼ 73.04%