78% easy-liqpay

Code Review | Easy LiqPay

WordPress plugin Easy LiqPay scored78%from 54 tests.

About plugin

  • Plugin page: easy-liqpay
  • Plugin version: 0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2.2
  • WordPress version: 6.3.1
  • First release: Apr 25, 2016
  • Latest release: Nov 10, 2019
  • Number of updates: 9
  • Update frequency: every 144.1 days
  • Top authors: hermit931 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,481 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▲0.45ms] Passed 4 tests

Server-side resources used by Easy LiqPay
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1741.08 ▼0.51
Dashboard /wp-admin3.60 ▲0.3051.33 ▲0.45
Posts /wp-admin/edit.php3.65 ▲0.2951.58 ▲1.14
Add New Post /wp-admin/post-new.php6.12 ▲0.23101.44 ▲7.05
Media Library /wp-admin/upload.php3.46 ▲0.2337.39 ▲0.74

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
widget_elp_widget_donate
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Easy LiqPay
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲12813.44 ▼0.927.47 ▲5.7541.20 ▼2.19
Dashboard /wp-admin2,211 ▲375.57 ▼0.0285.85 ▼4.4174.45 ▲34.63
Posts /wp-admin/edit.php2,113 ▲132.00 ▼0.0140.44 ▲4.3537.08 ▼2.98
Add New Post /wp-admin/post-new.php1,541 ▲323.60 ▲0.62655.41 ▲9.9463.78 ▲10.23
Media Library /wp-admin/upload.php1,413 ▲164.26 ▲0.03100.73 ▼1.3367.45 ▲26.44

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_elp_widget_donate
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/easy-liqpay/include/callback.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'ELiq_Pay_Field' not found in wp-content/plugins/easy-liqpay/include/fields/checkbox.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-liqpay/public/widgets/donate/ELiq_Pay_Donate_Widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ELiq_Pay_Field' not found in wp-content/plugins/easy-liqpay/include/fields/select.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ELiq_Pay_Field' not found in wp-content/plugins/easy-liqpay/include/fields/text.php:3
    • > PHP Fatal error
      Uncaught InvalidArgumentException: public_key is empty in wp-content/plugins/easy-liqpay/include/SDK/LiqPay.php:62
    • > PHP Fatal error
      Uncaught Error: Class 'ELiq_Pay_Field' not found in wp-content/plugins/easy-liqpay/include/fields/textarea.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ELiq_Pay_Field' not found in wp-content/plugins/easy-liqpay/include/fields/radio.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/easy-liqpay/easy-liqpay.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: privatbank, donate, privat24, liqpay, pb

easy-liqpay/easy-liqpay.php 92% from 13 tests

"Easy LiqPay" version 0.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,690 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP173601831,301
PO File2117155230
CSS2826156
JavaScript3003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.62
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes18.33%
Methods91
▷ Static methods1617.58%
▷ Public methods5863.74%
▷ Protected methods1213.19%
▷ Private methods2123.08%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants22
▷ Global constants836.36%
▷ Class constants1463.64%
▷ Public constants14100.00%

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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/menu-icon.png0.54KB0.46KB▼ 14.78%