74% gateway-undostres

Code Review | UnDosTres Payment Gateway

WordPress plugin UnDosTres Payment Gateway scored74%from 54 tests.

About plugin

  • Plugin page: gateway-undostres
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: Nov 23, 2022
  • Number of updates: 18
  • Update frequency: every 1.5 days
  • Top authors: carlosmbrenner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /960 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.69ms] Passed 4 tests

A check of server-side resources used by UnDosTres Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.90 ▼4.12
Dashboard /wp-admin3.34 ▲0.0343.41 ▼5.01
Posts /wp-admin/edit.php3.45 ▲0.0946.30 ▼5.25
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.39 ▼4.39
Media Library /wp-admin/upload.php3.26 ▲0.0334.83 ▲3.30

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 263 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

UnDosTres Payment Gateway: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.58 ▼0.711.56 ▼0.1239.04 ▼1.06
Dashboard /wp-admin2,208 ▲206.02 ▲1.1599.57 ▼16.0439.84 ▼1.70
Posts /wp-admin/edit.php2,093 ▲12.01 ▲0.0240.66 ▼4.2836.66 ▲2.12
Add New Post /wp-admin/post-new.php1,519 ▲517.60 ▲0.14652.61 ▲18.8351.11 ▼6.07
Media Library /wp-admin/upload.php1,393 ▲24.23 ▲0.0694.74 ▼3.3543.74 ▼2.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/gateway-undostres/includes/utility/class-wc-undostres-cookie.php+23
    Undefined index: UDT
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% 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 50% 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
The following issues need your attention
  • 160× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Opis\\JsonSchema\\Parsers\\PragmaParser' not found in wp-content/plugins/gateway-undostres/vendor/opis/json-schema/src/Parsers/Pragmas/SlotsPragmaParser.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Opis\\JsonSchema\\Variables' not found in wp-content/plugins/gateway-undostres/vendor/opis/json-schema/src/Variables/RefVariablesContainer.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Opis\\JsonSchema\\Keyword' not found in wp-content/plugins/gateway-undostres/vendor/opis/json-schema/src/Keywords/NotKeyword.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Opis\\JsonSchema\\Keyword' not found in wp-content/plugins/gateway-undostres/vendor/opis/json-schema/src/Keywords/ItemsKeyword.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Opis\\JsonSchema\\Keywords\\EnumKeyword' not found in wp-content/plugins/gateway-undostres/vendor/opis/json-schema/src/Keywords/EnumDataKeyword.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Opis\\JsonSchema\\Parsers\\KeywordParser' not found in wp-content/plugins/gateway-undostres/vendor/opis/json-schema/src/Parsers/Keywords/ExclusiveMaximumKeywordParser.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Opis\\JsonSchema\\Exceptions\\ParseException' not found in wp-content/plugins/gateway-undostres/vendor/opis/json-schema/src/Exceptions/InvalidKeywordException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Opis\\JsonSchema\\Keywords\\AbstractRefKeyword' not found in wp-content/plugins/gateway-undostres/vendor/opis/json-schema/src/Keywords/RecursiveRefKeyword.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Opis\\JsonSchema\\Keyword' not found in wp-content/plugins/gateway-undostres/vendor/opis/json-schema/src/Keywords/AllOfKeyword.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Opis\\JsonSchema\\Parsers\\Drafts\\Draft06' not found in wp-content/plugins/gateway-undostres/vendor/opis/json-schema/src/Parsers/Drafts/Draft07.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: You can take inspiration from this readme.txt

gateway-undostres/woocommerce-gateway-undostres.php 92% from 13 tests

The entry point to "UnDosTres Payment Gateway" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gateway-undostres.php" instead of "woocommerce-gateway-undostres.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin19,079 lines of code in 252 files:
LanguageFilesBlank linesComment linesLines of code
PHP2343,4266,62018,150
JSON1000667
Markdown71190244
CSS13318

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity12.43
▷ Minimum class complexity1.00
▷ Maximum class complexity252.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces27
Interfaces11
Traits8
Classes201
▷ Abstract classes94.48%
▷ Concrete classes19295.52%
▷ Final classes136.77%
Methods914
▷ Static methods14215.54%
▷ Public methods79987.42%
▷ Protected methods9510.39%
▷ Private methods202.19%
Functions27
▷ Named functions1140.74%
▷ Anonymous functions1659.26%
Constants66
▷ Global constants34.55%
▷ Class constants6395.45%
▷ Public constants3149.21%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png3.48KB2.00KB▼ 42.52%