99% donation-block

Code Review | Donation Block

WordPress plugin Donation Block scored 99% from 54 tests.

About plugin

  • Plugin page: donation-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9.0
  • WordPress version: 5.9.2
  • First release: Apr 11, 2019
  • Latest release: Jan 30, 2022
  • Number of updates: 15
  • Update frequency: every 68.3 days
  • Top authors: wpcodelibrary (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,089 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼290.79ms] Passed 4 tests

This is a short check of server-side resources used by Donation Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0254.96 ▲4.11
Dashboard /wp-admin3.42 ▲0.0231.56 ▼4.17
Posts /wp-admin/edit.php3.66 ▲0.0234.86 ▼3.08
Add New Post /wp-admin/post-new.php6.89 ▼0.0889.49 ▼1,155.68
Media Library /wp-admin/upload.php3.31 ▲0.0124.64 ▼0.23

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Donation Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲7316.18 ▲0.566.29 ▲0.122.22 ▼0.10
Dashboard /wp-admin2,895 ▲406.15 ▼0.09114.70 ▼23.16157.71 ▼6.83
Posts /wp-admin/edit.php2,694 ▲63.23 ▼0.1368.03 ▲4.79141.23 ▲6.70
Add New Post /wp-admin/post-new.php1,674 ▲1319.35 ▲3.73377.39 ▼35.24159.61 ▲3.59
Media Library /wp-admin/upload.php1,701 ▲35.42 ▼0.09143.11 ▼2.31185.82 ▼8.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Please describe screenshot #3 in donation-block/assets to your readme.txt
  • Donate link: Invalid URI found ("")
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

donation-block/donation-block.php 92% from 13 tests

The main PHP file in "Donation Block" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

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
Everything looks great! No dangerous files found in this plugin161 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript153094
PHP1123267

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin