78% multi-currency-paypal-donations

Code Review | Multi Currency PayPal Donations

WordPress plugin Multi Currency PayPal Donations scored 78% from 54 tests.

About plugin

  • Plugin page: multi-currency-pa...
  • Plugin version: 2.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.5.1
  • WordPress version: 6.3.1
  • First release: Jan 7, 2010
  • Latest release: Oct 31, 2015
  • Number of updates: 38
  • Update frequency: every 55.9 days
  • Top authors: greatwitenorth (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 11,947 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Multi Currency PayPal Donations
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.96 ▼1.89
Dashboard /wp-admin3.33 ▲0.0253.24 ▲0.67
Posts /wp-admin/edit.php3.38 ▲0.0256.09 ▼19.47
Add New Post /wp-admin/post-new.php5.91 ▲0.0299.09 ▼0.06
Media Library /wp-admin/upload.php3.25 ▲0.0243.10 ▲7.44
Multi Currency Donations /wp-admin/options-general.php?page=mcpd3.3335.57

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: 1 new table, 13 new options
New tables
wp_mcpd_currency
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
mcpd-onetime
widget_recent-comments
mcpd-thanks
can_compress_scripts
mcpd-onetimecheck
mcpd-itemname
mcpd_db_version
...

Browser metrics Passed 4 tests

A check of browser resources used by Multi Currency PayPal Donations
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲2314.47 ▲1.231.84 ▼0.1643.70 ▲0.02
Dashboard /wp-admin2,221 ▲154.89 ▼1.02114.36 ▲6.5142.19 ▼6.00
Posts /wp-admin/edit.php2,104 ▲152.05 ▲0.0543.86 ▲3.8538.36 ▲2.12
Add New Post /wp-admin/post-new.php1,529 ▼1323.07 ▼0.09671.61 ▼30.0849.57 ▼4.00
Media Library /wp-admin/upload.php1,400 ▲124.25 ▲0.0395.35 ▼10.3342.04 ▲0.06
Multi Currency Donations /wp-admin/options-general.php?page=mcpd1,3031.8442.3833.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mcpd
    • > Notice in wp-content/plugins/multi-currency-paypal-donations/options.php+222
    Undefined variable: i
    • > GET request to /wp-admin/options-general.php?page=mcpd
    • > Notice in wp-content/plugins/multi-currency-paypal-donations/multicurrdon.php+391
    Undefined variable: rss_items
    • > GET request to /wp-admin/options-general.php?page=mcpd
    • > Warning in wp-content/plugins/multi-currency-paypal-donations/multicurrdon.php+391
    Invalid argument supplied for foreach()

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
The following issues need your attention
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/multi-currency-paypal-donations/uninstall.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/multi-currency-paypal-donations/js/mcpdjs.php:4
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/multi-currency-paypal-donations/js/mcpdjs.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/multi-currency-paypal-donations/form.html.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multi-currency-paypal-donations/multicurrdon.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/multi-currency-paypal-donations/options.php:1

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png)
You can take inspiration from this readme.txt

multi-currency-paypal-donations/multicurrdon.php 85% from 13 tests

This is the main PHP file of "Multi Currency PayPal Donations" version 2.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 612 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("multi-currency-paypal-donations.php" instead of "multicurrdon.php")

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
Good job! No executable or dangerous file extensions detected2,268 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP511443959
JavaScript414038805
CSS3350495
HTML1309

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
7 PNG files occupy 0.13MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/trans.png0.09KB0.09KB0.00%
images/delete-icon.png0.60KB0.54KB▼ 9.34%
screenshot-1.png82.92KB23.85KB▼ 71.23%
screenshot-2.png45.00KB17.29KB▼ 61.59%
js/jscolor/hv.png2.80KB7.32KB0.00%