68% payments-for-elementor

Code Review | Payments for Elementor

WordPress plugin Payments for Elementor scored68%from 54 tests.

About plugin

  • Plugin page: payments-for-elem...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 22, 2020
  • Latest release: May 15, 2020
  • Number of updates: 8
  • Update frequency: every 10.4 days
  • Top authors: elegantmodules (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,035 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Payments for Elementor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.48 ▼0.85
Dashboard /wp-admin3.32 ▼0.0249.76 ▼8.62
Posts /wp-admin/edit.php3.37 ▲0.0244.61 ▼4.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.63 ▼19.57
Media Library /wp-admin/upload.php3.24 ▲0.0231.55 ▼2.30

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 175 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Payments for Elementor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.29 ▼1.095.07 ▲3.4244.28 ▲2.43
Dashboard /wp-admin2,224 ▲334.89 ▼0.0397.30 ▼2.6640.81 ▼2.60
Posts /wp-admin/edit.php2,106 ▲352.02 ▲0.0234.73 ▼4.1335.64 ▲1.62
Add New Post /wp-admin/post-new.php1,527 ▼1823.55 ▲5.46594.00 ▼16.9248.25 ▼0.20
Media Library /wp-admin/upload.php1,409 ▲214.22 ▲0.0296.81 ▼2.5742.03 ▼1.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/build.php
  • 119× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/lib/InvoiceLineItem.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\SingletonApiResource' not found in wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/lib/Balance.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/lib/Topup.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/lib/Invoice.php:71
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\ApiErrorException' not found in wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/lib/Exception/OAuth/OAuthErrorException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/lib/Source.php:49
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/lib/InvoiceItem.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\Exception\\ExceptionInterface' not found in wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/lib/Exception/UnexpectedValueException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\ApiErrorException' not found in wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/lib/Exception/ApiConnectionException.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\OAuth\\OAuthErrorException' not found in wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/lib/Exception/OAuth/InvalidGrantException.php:13

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 97% 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 to be fixed: The official readme.txt is a good inspiration

payments-for-elementor/payments-for-elementor.php Passed 13 tests

Analyzing the main PHP file in "Payments for Elementor" version 1.0.3
53 characters long description:
Add Stripe payment forms from right within Elementor.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
It is important to fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/payments-for-elementor/lib/stripe/stripe-php/data/ca-certificates.crt
7,774 lines of code in 165 files:
LanguageFilesBlank linesComment linesLines of code
PHP1561,2964,8316,680
Markdown25150685
CSS2360211
JavaScript2166117
JSON10061
make15017
YAML1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.47
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces13
Interfaces5
Traits7
Classes130
▷ Abstract classes86.15%
▷ Concrete classes12293.85%
▷ Final classes00.00%
Methods408
▷ Static methods16039.22%
▷ Public methods36088.24%
▷ Protected methods184.41%
▷ Private methods307.35%
Functions21
▷ Named functions1676.19%
▷ Anonymous functions523.81%
Constants619
▷ Global constants20.32%
▷ Class constants61799.68%
▷ Public constants617100.00%

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
No PNG images were found in this plugin