90% donatepress

Code Review | DonatePress - Donation and Fundraising Plugin

WordPress plugin DonatePress - Donation and Fundraising Plugin scored90%from 54 tests.

About plugin

  • Plugin page: donatepress
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Apr 15, 2022
  • Latest release: Apr 16, 2022
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: donatepress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /220 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.97ms] Passed 4 tests

A check of server-side resources used by DonatePress - Donation and Fundraising Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.86 ▼4.31
Dashboard /wp-admin3.33 ▼0.0144.22 ▼15.17
Posts /wp-admin/edit.php3.38 ▲0.0245.52 ▼0.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.74 ▼23.82
Media Library /wp-admin/upload.php3.25 ▲0.0235.21 ▲1.15

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

DonatePress - Donation and Fundraising Plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.17 ▼1.211.53 ▼0.0740.54 ▲2.39
Dashboard /wp-admin2,206 ▲155.86 ▲0.9396.66 ▼13.3238.85 ▼0.79
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0134.75 ▼2.5233.79 ▼0.08
Add New Post /wp-admin/post-new.php6,189 ▲4,65619.14 ▼4.13859.85 ▲159.1361.86 ▼7.02
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0396.96 ▼8.0742.91 ▼3.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: kickstarter, donation, crowdfunding

donatepress/plugin.php 92% from 13 tests

The primary PHP file in "DonatePress - Donation and Fundraising Plugin" version 0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("donatepress.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin7,861 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,365
JavaScript34282339
PHP22785105
Sass36139
CSS222313

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
src/assets/img/1.png10.11KB10.11KB0.00%