78% sequra

Code Review | Pasarela de pago para seQura

WordPress plugin Pasarela de pago para seQura scored78%from 54 tests.

About plugin

  • Plugin page: sequra
  • Plugin version: 2.0.7
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 21, 2023
  • Latest release: Nov 13, 2023
  • Number of updates: 15
  • Update frequency: every 15.8 days
  • Top authors: sequradev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,174 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.06MB] [CPU: ▼9.07ms] Passed 4 tests

Server-side resources used by Pasarela de pago para seQura
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.29 ▼7.85
Dashboard /wp-admin3.38 ▲0.0348.02 ▼14.74
Posts /wp-admin/edit.php3.43 ▲0.0746.67 ▲1.94
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.29 ▼14.11
Media Library /wp-admin/upload.php3.30 ▲0.0734.18 ▲0.41

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 189 new files
Database: no new tables, 8 new options
New WordPress options
woocommerce-sequra-deliveryreport-time
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
woocommerce_gateway_order

Browser metrics Passed 4 tests

An overview of browser requirements for Pasarela de pago para seQura
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3014.39 ▲0.051.69 ▲0.0340.56 ▼7.49
Dashboard /wp-admin2,197 ▲165.67 ▼0.0291.46 ▼10.5841.31 ▲4.91
Posts /wp-admin/edit.php2,102 ▲22.00 ▼0.0140.33 ▼2.6436.56 ▲0.31
Add New Post /wp-admin/post-new.php1,528 ▼723.26 ▲4.84645.81 ▼16.9952.09 ▼17.53
Media Library /wp-admin/upload.php1,402 ▲114.21 ▲0.00103.18 ▲0.0142.50 ▼2.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • woocommerce-sequra-deliveryreport-time
    • widget_theysaidso_widget
    • woocommerce_gateway_order
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sequra/templates/checkout-script.php
    • > /wp-content/plugins/sequra/templates/banner-pp6.php
    • > /wp-content/plugins/sequra/templates/banner-pp3.php
    • > /wp-content/plugins/sequra/templates/banner-pp9.php
    • > /wp-content/plugins/sequra/templates/banner-i1.php
  • 113× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/sequra/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/sequra/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Processor\\MemoryProcessor' not found in wp-content/plugins/sequra/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\Handler' not found in wp-content/plugins/sequra/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\BufferHandler' not found in wp-content/plugins/sequra/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/sequra/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/sequra/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sequra/gateway-sequra.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\MailHandler' not found in wp-content/plugins/sequra/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/sequra/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: bnpl, gateway, payment, woocommerce, installments...

sequra/sequra.php 92% from 13 tests

The entry point to "Pasarela de pago para seQura" version 2.0.7 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.9" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin13,439 lines of code in 180 files:
LanguageFilesBlank linesComment linesLines of code
PHP1612,5077,38011,798
Markdown102850801
JSON400349
PO File1131260257
CSS3376212
JavaScript11022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity11.15
▷ Minimum class complexity1.00
▷ Maximum class complexity126.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces15
Interfaces10
Traits5
Classes128
▷ Abstract classes97.03%
▷ Concrete classes11992.97%
▷ Final classes32.52%
Methods908
▷ Static methods10011.01%
▷ Public methods65071.59%
▷ Protected methods17619.38%
▷ Private methods829.03%
Functions44
▷ Named functions1738.64%
▷ Anonymous functions2761.36%
Constants70
▷ Global constants34.29%
▷ Class constants6795.71%
▷ Public constants4059.70%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin