83% ukey-pay

Code Review | UKey Pay

WordPress plugin UKey Pay scored83%from 54 tests.

About plugin

  • Plugin page: ukey-pay
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.0
  • WordPress version: 6.3.1
  • First release: Oct 21, 2022
  • Latest release: Oct 22, 2022
  • Number of updates: 2
  • Update frequency: every 43.0 days
  • Top authors: udaychandra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /143 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.17ms] Passed 4 tests

A check of server-side resources used by UKey Pay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.36 ▼0.26
Dashboard /wp-admin3.36 ▲0.0646.63 ▼3.41
Posts /wp-admin/edit.php3.47 ▲0.1248.68 ▼0.44
Add New Post /wp-admin/post-new.php5.94 ▲0.0579.90 ▼19.83
Media Library /wp-admin/upload.php3.28 ▲0.0634.21 ▼0.98

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

UKey Pay: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲13013.21 ▼1.382.16 ▲0.5540.32 ▼1.92
Dashboard /wp-admin2,224 ▲334.85 ▼0.06108.61 ▼3.4740.44 ▼3.80
Posts /wp-admin/edit.php2,107 ▲182.04 ▲0.0339.32 ▼2.4734.16 ▼2.83
Add New Post /wp-admin/post-new.php1,543 ▲1523.07 ▼0.14693.51 ▲25.7165.16 ▲2.19
Media Library /wp-admin/upload.php1,409 ▲214.23 ▲0.09100.24 ▼13.3942.16 ▼6.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ukey-pay/admin/partials/ukey-admin-settings-header.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ukey-pay/admin/partials/ukey-admin-settings-client-id.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/ukey-pay/admin/partials/ukey-admin-settings-page.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === ukey-pay === )
The official readme.txt is a good inspiration

ukey-pay/ukey.php 77% from 13 tests

"UKey Pay" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ukey-pay.php" instead of "ukey.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 258 characters long)

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
There were no executable files found in this plugin289 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13135513238
CSS26826
JavaScript252725

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin