58% pay-addons-for-elementor

Code Review | Elementor Stripe Payment

WordPress plugin Elementor Stripe Payment scored58%from 54 tests.

About plugin

  • Plugin page: pay-addons-for-el...
  • Plugin version: 1.6.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2023
  • Latest release: Nov 12, 2023
  • Number of updates: 15
  • Update frequency: every 15.6 days
  • Top authors: payaddons (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /821 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.53MB] [CPU: ▼2.03ms] Passed 4 tests

An overview of server-side resources used by Elementor Stripe Payment
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5937.55 ▼4.78
Dashboard /wp-admin3.89 ▲0.5948.54 ▼3.90
Posts /wp-admin/edit.php3.94 ▲0.5954.96 ▲9.78
Add New Post /wp-admin/post-new.php6.41 ▲0.5289.34 ▼7.03
Media Library /wp-admin/upload.php3.65 ▲0.4242.39 ▲7.58
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0138.40

Server storage [IO: ▲5.13MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Elementor Stripe Payment
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7814.33 ▼0.091.65 ▼0.1030.05 ▼11.09
Dashboard /wp-admin2,245 ▲685.63 ▼0.0196.38 ▲1.7844.41 ▲6.20
Posts /wp-admin/edit.php2,154 ▲542.16 ▲0.2141.68 ▲3.0840.51 ▲4.57
Add New Post /wp-admin/post-new.php1,556 ▲3023.08 ▼0.04694.55 ▲11.4265.05 ▲7.64
Media Library /wp-admin/upload.php1,447 ▲474.18 ▼0.04102.34 ▼10.6448.23 ▼0.27
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1011.6525.5728.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/pay-addons-for-elementor/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_recent-posts
    • can_compress_scripts
    • fs_accounts
    • widget_recent-comments
    • widget_theysaidso_widget
    • fs_active_plugins
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pay-addons-for-elementor/vendor/stripe/stripe-php/build.php
    • > /wp-content/plugins/pay-addons-for-elementor/vendor/stripe/stripe-php/update_certs.php
  • 327× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(EPA_ADDONS_PATH/includes/admin/templates/settings.php): failed to open stream: No such file or directory in wp-content/plugins/pay-addons-for-elementor/includes/admin/templates/index.php on line 45
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/pay-addons-for-elementor/vendor/stripe/stripe-php/lib/FinancialConnections/Account.php:29
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pay-addons-for-elementor/vendor/stripe/stripe-php/build.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/pay-addons-for-elementor/vendor/stripe/stripe-php/lib/Service/Terminal/LocationService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/pay-addons-for-elementor/vendor/stripe/stripe-php/lib/Service/Issuing/CardService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/pay-addons-for-elementor/vendor/stripe/stripe-php/lib/Service/FinancialConnections/SessionService.php:7
    • > PHP Warning
      Use of undefined constant EPA_ADDONS_PATH - assumed 'EPA_ADDONS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pay-addons-for-elementor/includes/admin/templates/index.php on line 45
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/pay-addons-for-elementor/vendor/stripe/stripe-php/lib/Issuing/Card.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\ApiErrorException' not found in wp-content/plugins/pay-addons-for-elementor/vendor/stripe/stripe-php/lib/Exception/UnknownApiErrorException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/pay-addons-for-elementor/vendor/stripe/stripe-php/lib/Refund.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: google pay, elementor, stripe, payment, credit card...

pay-addons-for-elementor/elementor-pay-addons.php 85% from 13 tests

The entry point to "Elementor Stripe Payment" version 1.6.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pay-addons-for-elementor.php" instead of "elementor-pay-addons.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 213 characters long)

Code Analysis 3% 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
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/pay-addons-for-elementor/vendor/stripe/stripe-php/data/ca-certificates.crt
60,622 lines of code in 595 files:
LanguageFilesBlank linesComment linesLines of code
PHP54612,47534,45355,072
Markdown101,11102,900
CSS171221141,244
JSON600677
JavaScript74883358
HTML5279255
XML21053
SVG10034
make110029

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity14.21
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces65
Interfaces19
Traits10
Classes428
▷ Abstract classes225.14%
▷ Concrete classes40694.86%
▷ Final classes30.74%
Methods3,034
▷ Static methods53917.77%
▷ Public methods2,43380.19%
▷ Protected methods852.80%
▷ Private methods51617.01%
Functions150
▷ Named functions11677.33%
▷ Anonymous functions3422.67%
Constants1,235
▷ Global constants1159.31%
▷ Class constants1,12090.69%
▷ Public constants1,10798.84%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%