79% na-splatky-tb

Code Review | Na splátkyTB

WordPress plugin Na splátkyTB scored79%from 54 tests.

About plugin

  • Plugin page: na-splatky-tb
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 1, 2022
  • Latest release: Mar 19, 2022
  • Number of updates: 5
  • Update frequency: every 4.6 days
  • Top authors: webikon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /279 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Na splátkyTB
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.72 ▲0.08
Dashboard /wp-admin3.32 ▲0.0246.63 ▼2.47
Posts /wp-admin/edit.php3.37 ▲0.0149.89 ▼4.32
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.74 ▼7.63
Media Library /wp-admin/upload.php3.24 ▲0.0136.51 ▲2.79

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Na splátkyTB
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.22 ▼1.164.40 ▲2.7838.24 ▼6.73
Dashboard /wp-admin2,215 ▲275.84 ▼0.0599.34 ▼8.4741.35 ▼2.24
Posts /wp-admin/edit.php2,098 ▲62.00 ▲0.0241.03 ▲0.1338.35 ▼0.65
Add New Post /wp-admin/post-new.php1,542 ▲2823.30 ▲5.75652.46 ▼22.7551.53 ▼3.35
Media Library /wp-admin/upload.php1,394 ▲94.21 ▲0.0296.23 ▼5.1943.05 ▼1.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/na-splatky-tb/templates/nasplatky-modal-boxes.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/na-splatky-tb/includes/class-gateway.php:8
    • > PHP Warning
      Use of undefined constant PRODUCT_NAME - assumed 'PRODUCT_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/na-splatky-tb/templates/nasplatky-modal-boxes.php on line 4
    • > PHP Warning
      Use of undefined constant PRODUCT_NAME - assumed 'PRODUCT_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/na-splatky-tb/templates/nasplatky-modal.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'MatejKravjar\\BuildingBlocks\\SimpleLogger_1a\\SimpleLogger' not found in wp-content/plugins/na-splatky-tb/vendor/building-blocks/WoocommerceLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Webikon\\Woocommerce_Payment_Gateway\\Tatrabanka\asplatky\\add_action() in wp-content/plugins/na-splatky-tb/na-splatky-tb.php:24
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/na-splatky-tb/templates/nasplatky-modal-boxes.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Webikon\\Woocommerce_Payment_Gateway\\Tatrabanka\asplatky\\__() in wp-content/plugins/na-splatky-tb/templates/nasplatky-modal.php:12
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/na-splatky-tb/templates/nasplatky-modal-boxes.php on line 127

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: woocommerce, nasplatky, payments, tatrabanka

na-splatky-tb/na-splatky-tb.php Passed 13 tests

The entry point to "Na splátkyTB" version 1.0.7 is a PHP file that has certain tags in its header comment area
52 characters long description:
Na splátkyTB payment gateway for WooCommerce e-shop

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,956 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP151771791,129
Sass3677357
JavaScript31477197
PO File16066189
SVG50179
JSON1004
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods37
▷ Static methods1437.84%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions14.55%
▷ Anonymous functions2195.45%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.00%

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.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/illustration.png5.54KB4.97KB▼ 10.37%
assets/nasplatky.png6.83KB5.36KB▼ 21.56%