73% donation-forms-by-givecloud

Code Review | Donation Forms WP by Givecloud

WordPress plugin Donation Forms WP by Givecloud scored73%from 54 tests.

About plugin

  • Plugin page: donation-forms-by...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 13, 2023
  • Latest release: Mar 23, 2023
  • Number of updates: 21
  • Update frequency: every 0.6 days
  • Top authors: givecloud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /280 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.72MB] [CPU: ▼4.82ms] Passed 4 tests

This is a short check of server-side resources used by Donation Forms WP by Givecloud
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7344.35 ▲6.64
Dashboard /wp-admin4.04 ▲0.6952.65 ▼5.49
Posts /wp-admin/edit.php4.09 ▲0.7349.86 ▲2.36
Add New Post /wp-admin/post-new.php6.62 ▲0.7385.10 ▼22.19
Media Library /wp-admin/upload.php3.96 ▲0.7339.93 ▲6.03

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 1,412 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Donation Forms WP by Givecloud
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.25 ▼1.181.63 ▲0.0945.53 ▲6.53
Dashboard /wp-admin2,251 ▲634.90 ▼0.89114.45 ▲11.5842.24 ▲0.13
Posts /wp-admin/edit.php2,130 ▲412.03 ▲0.0336.54 ▲1.8333.28 ▼2.77
Add New Post /wp-admin/post-new.php1,543 ▲2123.34 ▲0.20661.41 ▲13.4354.48 ▲4.99
Media Library /wp-admin/upload.php1,429 ▲414.19 ▼0.0896.86 ▲3.1242.63 ▲2.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 242× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' not found in wp-content/plugins/donation-forms-by-givecloud/vendor/symfony/var-dumper/Dumper/ServerDumper.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon\\Carbon' not found in wp-content/plugins/donation-forms-by-givecloud/vendor/illuminate/support/Carbon.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Loader\\FileLoader' not found in wp-content/plugins/donation-forms-by-givecloud/vendor/symfony/translation/Loader/YamlFileLoader.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/donation-forms-by-givecloud/vendor/illuminate/support/Facades/Bus.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Dumper\\FileDumper' not found in wp-content/plugins/donation-forms-by-givecloud/vendor/symfony/translation/Dumper/QtFileDumper.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/donation-forms-by-givecloud/vendor/illuminate/support/Facades/Response.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Cloner\\Stub' not found in wp-content/plugins/donation-forms-by-givecloud/vendor/symfony/var-dumper/Caster/TraceStub.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Doctrine\\Inflector\\GenericLanguageInflectorFactory' not found in wp-content/plugins/donation-forms-by-givecloud/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/InflectorFactory.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' not found in wp-content/plugins/donation-forms-by-givecloud/vendor/symfony/var-dumper/Cloner/AbstractCloner.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Cookie\\Factory' not found in wp-content/plugins/donation-forms-by-givecloud/vendor/illuminate/contracts/Cookie/QueueingFactory.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 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
10 plugin tags: fundraising, form builder, forms, paypal, givecloud...

donation-forms-by-givecloud/givecloud.php 62% from 13 tests

Analyzing the main PHP file in "Donation Forms WP by Givecloud" version 1.0.2
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("donation-forms-by-givecloud.php" instead of "givecloud.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.4" instead of "5.0")
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.0" instead of "5.6")
  • Description: Please don't use more than 140 characters for the plugin description (currently 154 characters long)

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Please fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/donation-forms-by-givecloud/vendor/nesbot/carbon/bin/carbon.bat
61,102 lines of code in 1,200 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,17011,32437,35455,593
XSD392482,803
JSON2001,139
Markdown193160794
CSS2146153679
reStructuredText1747874
JavaScript10010
XML1216
DOS Batch1004

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity10.06
▷ Minimum class complexity1.00
▷ Maximum class complexity323.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces89
Interfaces126
Traits36
Classes345
▷ Abstract classes216.09%
▷ Concrete classes32493.91%
▷ Final classes4513.89%
Methods3,349
▷ Static methods75622.57%
▷ Public methods2,87985.97%
▷ Protected methods2788.30%
▷ Private methods1925.73%
Functions485
▷ Named functions12625.98%
▷ Anonymous functions35974.02%
Constants190
▷ Global constants147.37%
▷ Class constants17692.63%
▷ Public constants15386.93%

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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png18.26KB5.39KB▼ 70.50%