68% crypto-donations

Code Review | Crypto Donations

WordPress plugin Crypto Donations scored 68% from 54 tests.

About plugin

  • Plugin page: crypto-donations
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.3-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 24, 2019
  • Latest release: Dec 15, 2019
  • Number of updates: 8
  • Update frequency: every 10.9 days
  • Top authors: jediwed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,544 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.89MB] [CPU: ▼38.76ms] Passed 4 tests

Server-side resources used by Crypto Donations
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.29 ▼5.97
Dashboard /wp-admin3.06 ▼0.2525.50 ▼25.71
Posts /wp-admin/edit.php3.06 ▼0.3022.59 ▼28.96
Add New Post /wp-admin/post-new.php3.06 ▼2.8319.81 ▼86.41
Media Library /wp-admin/upload.php3.06 ▼0.1723.13 ▼13.97
Settings /wp-admin/admin.php?page=crypto_donations_settings3.0623.29
Crypto Donations /wp-admin/admin.php?page=crypto-donations/crypto-donations.php3.0625.71

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
crypto_donations_settings_widget_color
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
crypto_donations_settings_text_color
crypto_donations_settings_brightness

Browser metrics Passed 4 tests

This is an overview of browser requirements for Crypto Donations
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲22814.05 ▼0.2510.90 ▲9.0540.63 ▼4.56
Dashboard /wp-admin2,254 ▲655.23 ▲0.24101.52 ▼19.3337.82 ▼10.64
Posts /wp-admin/edit.php2,139 ▲502.32 ▲0.3236.25 ▼5.6731.23 ▼5.91
Add New Post /wp-admin/post-new.php1,552 ▲1923.25 ▲2.03622.00 ▼82.0534.29 ▼48.78
Media Library /wp-admin/upload.php1,436 ▲454.51 ▲0.33101.68 ▼3.5847.14 ▼0.06
Settings /wp-admin/admin.php?page=crypto_donations_settings1,1622.2348.1927.80
Crypto Donations /wp-admin/admin.php?page=crypto-donations/crypto-donations.php9131.8729.9029.25

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 validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 9 options
    • crypto_donations_settings_widget_color
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • crypto_donations_settings_text_color
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • crypto_donations_settings_brightness

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=crypto-donations/crypto-donations.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=crypto-donations/crypto-donations.php
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wptuts_add_color_picker' not found or invalid function name

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crypto-donations/crypto-donations.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes:
  • License uri: Invalid url: ""
Please take inspiration from this readme.txt

crypto-donations/crypto-donations.php Passed 13 tests

The main PHP script in "Crypto Donations" version 1.0.3 is automatically included on every request by WordPress
45 characters long description:
This plugin allows to create Crypto Donations

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 plugin366 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP12615233
CSS37675
JavaScript43738
Markdown110020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/icon_bitcoin.png1.19KB0.99KB▼ 17.20%
icons/icon_litecoin.png1.27KB0.88KB▼ 31.01%
icons/icon_ethereum.png0.79KB0.55KB▼ 30.12%