74% mg-wc-stripe

Code Review | mg wc Stripe

WordPress plugin mg wc Stripe scored74%from 54 tests.

About plugin

  • Plugin page: mg-wc-stripe
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Oct 29, 2014
  • Latest release: Nov 7, 2014
  • Number of updates: 3
  • Update frequency: every 3.0 days
  • Top authors: giuliom (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /989 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by mg wc Stripe
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.99 ▲0.41
Dashboard /wp-admin3.32 ▲0.0248.41 ▼1.08
Posts /wp-admin/edit.php3.37 ▲0.0253.20 ▲4.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.68 ▲10.06
Media Library /wp-admin/upload.php3.25 ▲0.0237.00 ▲2.15

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for mg wc Stripe
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.75 ▲0.031.93 ▼0.1247.17 ▲2.65
Dashboard /wp-admin2,198 ▲215.58 ▼0.0993.23 ▼1.5339.74 ▼1.63
Posts /wp-admin/edit.php2,107 ▲72.00 ▼0.0041.15 ▼1.6338.63 ▲2.68
Add New Post /wp-admin/post-new.php1,529 ▼523.75 ▲5.44656.73 ▲24.1557.44 ▼6.04
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.01100.48 ▼24.9642.87 ▼9.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 29× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Error' not found in wp-content/plugins/mg-wc-stripe/includes/lib/stripe-php/lib/Stripe/InvalidRequestError.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Object' not found in wp-content/plugins/mg-wc-stripe/includes/lib/stripe-php/lib/Stripe/List.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Object' not found in wp-content/plugins/mg-wc-stripe/includes/lib/stripe-php/lib/Stripe/AttachedObject.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/mg-wc-stripe/includes/lib/stripe-php/lib/Stripe/Recipient.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/mg-wc-stripe/includes/lib/stripe-php/lib/Stripe/Transfer.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/mg-wc-stripe/includes/lib/stripe-php/lib/Stripe/Event.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/mg-wc-stripe/includes/lib/stripe-php/lib/Stripe/Plan.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/mg-wc-stripe/includes/lib/stripe-php/lib/Stripe/Invoice.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/mg-wc-stripe/includes/lib/stripe-php/lib/Stripe/Charge.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/mg-wc-stripe/includes/lib/stripe-php/lib/Stripe/Subscription.php:3

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 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: stripe, payments, woocommerce

mg-wc-stripe/plugin.php 92% from 13 tests

"mg wc Stripe" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("mg-wc-stripe.php" instead of "plugin.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions 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
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/mg-wc-stripe/includes/lib/stripe-php/lib/data/ca-certificates.crt
2,037 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP382985931,816
JavaScript1301124
PO File1313397

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.03
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes36
▷ Abstract classes411.11%
▷ Concrete classes3288.89%
▷ Final classes00.00%
Methods169
▷ Static methods6538.46%
▷ Public methods14887.57%
▷ Protected methods84.73%
▷ Private methods137.69%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.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
No PNG images were found in this plugin