58% rainbowpaypress

Code Review | RainbowPayPress

WordPress plugin RainbowPayPress scored58%from 54 tests.

About plugin

  • Plugin page: rainbowpaypress
  • Plugin version: 3.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2016
  • Latest release: Mar 6, 2017
  • Number of updates: 26
  • Update frequency: every 14.7 days
  • Top authors: maratbn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /870 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼3.10ms] Passed 4 tests

Server-side resources used by RainbowPayPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1943.55 ▼1.25
Dashboard /wp-admin3.53 ▲0.2357.28 ▲1.26
Posts /wp-admin/edit.php3.64 ▲0.2850.63 ▼2.61
Add New Post /wp-admin/post-new.php6.11 ▲0.2287.99 ▼9.81
Media Library /wp-admin/upload.php3.45 ▲0.2239.63 ▲2.21
Help /wp-admin/admin.php?page=plugin_RainbowPayPress_root3.4238.27
Items /wp-admin/admin.php?page=plugin_RainbowPayPress_items3.4236.57
Settings /wp-admin/admin.php?page=plugin_RainbowPayPress_settings3.4237.36
Transactions /wp-admin/admin.php?page=plugin_RainbowPayPress_transactions3.4238.02

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 164 new files
Database: 2 new tables, 6 new options
New tables
wp_plugin_rainbow_pay_press_items
wp_plugin_rainbow_pay_press_transactions
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for RainbowPayPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8914.74 ▲0.682.06 ▼0.2843.79 ▲0.59
Dashboard /wp-admin2,259 ▲564.87 ▼0.24100.73 ▼5.0938.81 ▼0.31
Posts /wp-admin/edit.php2,135 ▲352.06 ▲0.0236.18 ▼2.5334.03 ▼4.59
Add New Post /wp-admin/post-new.php1,573 ▲4223.23 ▼0.13626.15 ▼37.6562.58 ▲2.32
Media Library /wp-admin/upload.php1,432 ▲324.19 ▼0.0299.54 ▲0.7248.29 ▼2.96
Help /wp-admin/admin.php?page=plugin_RainbowPayPress_root1,2792.9162.6044.10
Items /wp-admin/admin.php?page=plugin_RainbowPayPress_items1,1672.8054.9229.02
Settings /wp-admin/admin.php?page=plugin_RainbowPayPress_settings1,1432.9457.4037.42
Transactions /wp-admin/admin.php?page=plugin_RainbowPayPress_transactions1,2563.0459.7230.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables were found after uninstall: 2 tables
    • wp_plugin_rainbow_pay_press_transactions
    • wp_plugin_rainbow_pay_press_items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/build.php
  • 78× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'plugin_RainbowPayPress\\Stripe\\TestCase' not found in wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/tests/ProductTest.php:5
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/build.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'plugin_RainbowPayPress\\Stripe\\TestCase' not found in wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/tests/BalanceTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'plugin_RainbowPayPress\\Stripe\\ApiResource' not found in wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/lib/Plan.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'plugin_RainbowPayPress\\Stripe\\TestCase' not found in wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/tests/TransferTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'plugin_RainbowPayPress\\Stripe\\Error\\Base' not found in wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/lib/Error/Api.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'plugin_RainbowPayPress\\Stripe\\ApiResource' not found in wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/lib/Customer.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'plugin_RainbowPayPress\\Stripe\\TestCase' not found in wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/tests/InvoiceTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'plugin_RainbowPayPress\\Stripe\\ExternalAccount' not found in wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/lib/BankAccount.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'plugin_RainbowPayPress\\Stripe\\ApiResource' not found in wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/lib/Event.php:5

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 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
The official readme.txt might help

rainbowpaypress/RainbowPayPress.php 85% from 13 tests

Analyzing the main PHP file in "RainbowPayPress" version 3.1.0
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rainbowpaypress.php" instead of "RainbowPayPress.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Please make sure to remedy the following
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/rainbowpaypress/stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/data/ca-certificates.crt
28,309 lines of code in 153 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript586,2217,18322,985
PHP879771,0025,003
Markdown21330214
JSON10036
XML20030
CSS1162023
YAML23018

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.28
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity1.49
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces5
Interfaces3
Traits0
Classes82
▷ Abstract classes56.10%
▷ Concrete classes7793.90%
▷ Final classes00.00%
Methods369
▷ Static methods12934.96%
▷ Public methods33490.51%
▷ Protected methods215.69%
▷ Private methods143.79%
Functions26
▷ Named functions2388.46%
▷ Anonymous functions311.54%
Constants19
▷ Global constants15.26%
▷ Class constants1894.74%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
stripe-php-3.4.0--tweaked--2016-03-18--01--namespaced/data/test.png0.09KB0.09KB0.00%