84% skaut-fio-bank-transactions

Code Review | Fio bank - transactions

WordPress plugin Fio bank - transactions scored84%from 54 tests.

About plugin

  • Plugin page: skaut-fio-bank-tr...
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 7, 2017
  • Latest release: Apr 3, 2023
  • Number of updates: 50
  • Update frequency: every 40.7 days
  • Top authors: skaut (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,372 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.49MB] [CPU: ▲0.79ms] Passed 4 tests

This is a short check of server-side resources used by Fio bank - transactions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4847.17 ▲6.41
Dashboard /wp-admin3.80 ▲0.5056.94 ▲6.78
Posts /wp-admin/edit.php3.85 ▲0.4955.12 ▲5.12
Add New Post /wp-admin/post-new.php6.38 ▲0.5094.31 ▼12.59
Media Library /wp-admin/upload.php3.73 ▲0.5042.35 ▲4.21
Správa účtů /wp-admin/edit.php?post_type=fio_accounts3.7743.11
Fio Bank /wp-admin/admin.php?page=fio_bank_transactions3.6329.88

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Fio bank - transactions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲17914.45 ▲0.2019.01 ▲17.2545.93 ▲4.74
Dashboard /wp-admin2,221 ▲335.83 ▼0.05106.17 ▼2.6686.62 ▲41.29
Posts /wp-admin/edit.php2,122 ▲302.12 ▲0.1035.79 ▼2.7633.64 ▼2.98
Add New Post /wp-admin/post-new.php1,695 ▲17622.45 ▼0.81684.31 ▲5.8441.72 ▼17.67
Media Library /wp-admin/upload.php1,418 ▲304.13 ▼0.09102.12 ▼12.4771.49 ▲22.69
Správa účtů /wp-admin/edit.php?post_type=fio_accounts1,1161.9536.8531.95
Fio Bank /wp-admin/admin.php?page=fio_bank_transactions1,7622.7639.6734.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following items
  • 75× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'FioTransactions\\Vendor\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/skaut-fio-bank-transactions/vendor/guzzlehttp/psr7/src/PumpStream.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'FioTransactions\\Api\\IAccount' not found in wp-content/plugins/skaut-fio-bank-transactions/src/Api/Account.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'FioTransactions\\Vendor\\GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/skaut-fio-bank-transactions/vendor/guzzlehttp/promises/src/FulfilledPromise.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'FioTransactions\\Vendor\\Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/skaut-fio-bank-transactions/vendor/guzzlehttp/psr7/src/Request.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'FioTransactions\\Vendor\\Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/skaut-fio-bank-transactions/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'FioTransactions\\Vendor\\GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/skaut-fio-bank-transactions/vendor/guzzlehttp/promises/src/CancellationException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'FioTransactions\\Vendor\\GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/skaut-fio-bank-transactions/vendor/guzzlehttp/promises/src/TaskQueue.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'FioTransactions\\Vendor\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/skaut-fio-bank-transactions/vendor/guzzlehttp/psr7/src/NoSeekStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'FioTransactions\\Vendor\\GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/skaut-fio-bank-transactions/vendor/guzzlehttp/promises/src/RejectedPromise.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'FioTransactions\\Vendor\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/skaut-fio-bank-transactions/vendor/guzzlehttp/psr7/src/MultipartStream.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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: fio, shortcode, skaut, multisite, transactions...

skaut-fio-bank-transactions/fio-transactions.php 92% from 13 tests

The principal PHP file in "Fio bank - transactions" v. 1.2.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("skaut-fio-bank-transactions.php" instead of "fio-transactions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected13,863 lines of code in 212 files:
LanguageFilesBlank linesComment linesLines of code
PHP2026328,50013,328
JavaScript62038282
JSON100234
CSS32019

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity12.11
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces36
Interfaces33
Traits4
Classes150
▷ Abstract classes00.00%
▷ Concrete classes150100.00%
▷ Final classes5536.67%
Methods1,189
▷ Static methods25721.61%
▷ Public methods99683.77%
▷ Protected methods161.35%
▷ Private methods17714.89%
Functions194
▷ Named functions3417.53%
▷ Anonymous functions16082.47%
Constants106
▷ Global constants54.72%
▷ Class constants10195.28%
▷ Public constants9089.11%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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
src/Admin/public/img/fio.png0.69KB0.54KB▼ 20.94%