84% solpay-donation-fundraising

Code Review | Solpay Donation & Fundraising

WordPress plugin Solpay Donation & Fundraising scored84%from 54 tests.

About plugin

  • Plugin page: solpay-donation-f...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9.2
  • WordPress version: 6.3.1
  • First release: May 3, 2022
  • Latest release: May 3, 2022
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: somasocial (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /536 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Solpay Donation & Fundraising
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.91 ▲0.47
Dashboard /wp-admin3.32 ▼0.0247.92 ▼18.23
Posts /wp-admin/edit.php3.37 ▲0.0249.80 ▼8.28
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.90 ▼14.99
Media Library /wp-admin/upload.php3.24 ▲0.0238.69 ▲4.06
Solpay Donation & Fundraising /wp-admin/options-general.php?page=solpay-donation-fundraising3.2842.79

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Solpay Donation & Fundraising
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲9115.39 ▲1.0185.66 ▲83.8343.92 ▲5.77
Dashboard /wp-admin2,226 ▲234.85 ▼0.14109.76 ▼0.6143.91 ▲0.71
Posts /wp-admin/edit.php2,108 ▲82.00 ▼0.0139.23 ▼1.5535.23 ▼1.78
Add New Post /wp-admin/post-new.php1,533 ▲723.41 ▲5.76670.19 ▼18.9053.30 ▼1.96
Media Library /wp-admin/upload.php1,405 ▲54.18 ▼0.05107.95 ▲12.4245.44 ▲2.47
Solpay Donation & Fundraising /wp-admin/options-general.php?page=solpay-donation-fundraising1,6066.79144.2872.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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 no errors were found, 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
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/solpay-donation-fundraising/public/partials/solpay-donation-fundraising-form.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/solpay-donation-fundraising/admin/partials/solpay-donation-fundraising-admin-settings.php:1
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/solpay-donation-fundraising/public/partials/solpay-donation-fundraising-form.php on line 5
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, string given in wp-content/plugins/solpay-donation-fundraising/public/partials/solpay-donation-fundraising-form.php on line 5
    • > PHP Warning
      Use of undefined constant SOLPAY_DONATION_FUNDRAISING_SPL_TOKENS - assumed 'SOLPAY_DONATION_FUNDRAISING_SPL_TOKENS' (this will throw an Error in a future version of PHP) in wp-content/plugins/solpay-donation-fundraising/public/partials/solpay-donation-fundraising-form.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/solpay-donation-fundraising/public/partials/solpay-donation-fundraising-form.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
No plugin tags provided

solpay-donation-fundraising/solpay-donation-fundraising.php Passed 13 tests

The principal PHP file in "Solpay Donation & Fundraising" v. 1.0.0 is loaded by WordPress automatically on each request
29 characters long description:
Solpay Donation & Fundraising

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,075 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP12203519533
TypeScript6790326
Sass1360169
JSON20038
JavaScript33288
CSS2041

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.19
Average class complexity2.86
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants7
▷ Global constants7100.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
PNG images were not found in this plugin