89% gateway-payping-ghesta-for-woocommerce

Code Review | gateway-payping-ghesta-for-woocommerce

WordPress plugin gateway-payping-ghesta-for-woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: gateway-payping-g...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8
  • WordPress version: 6.3.1
  • First release: Jan 1, 2022
  • Latest release: Feb 26, 2022
  • Number of updates: 4
  • Update frequency: every 14.5 days
  • Top authors: mahdisarani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /376 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 gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.79ms] Passed 4 tests

A check of server-side resources used by gateway-payping-ghesta-for-woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0939.42 ▼0.98
Dashboard /wp-admin3.40 ▲0.0545.98 ▼14.83
Posts /wp-admin/edit.php3.45 ▲0.0942.64 ▼4.28
Add New Post /wp-admin/post-new.php5.98 ▲0.0988.87 ▼11.08
Media Library /wp-admin/upload.php3.32 ▲0.0935.35 ▼0.95

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for gateway-payping-ghesta-for-woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6813.23 ▼1.361.72 ▼0.1240.35 ▼3.97
Dashboard /wp-admin2,217 ▲265.83 ▼0.0697.60 ▼9.8444.75 ▲2.06
Posts /wp-admin/edit.php2,103 ▲142.05 ▲0.0135.89 ▼3.2038.53 ▲1.44
Add New Post /wp-admin/post-new.php1,551 ▲1418.27 ▲0.25643.27 ▲22.4452.07 ▼6.16
Media Library /wp-admin/upload.php1,405 ▲204.23 ▼0.09103.29 ▼0.6747.10 ▲5.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Requires php: Invalid version format
You can take inspiration from this readme.txt

gateway-payping-ghesta-for-woocommerce/index.php 92% from 13 tests

"gateway-payping-ghesta-for-woocommerce" version 1.0.1'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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gateway-payping-ghesta-for-woocommerce.php" instead of "index.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 detected408 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18628408

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity65.00
▷ Minimum class complexity65.00
▷ Maximum class complexity65.00
Average method complexity11.67
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
assets/images/logo.png2.39KB1.24KB▼ 48.04%