83% wc-paygol

Code Review | Gateway Paygol Integration

WordPress plugin Gateway Paygol Integration scored83%from 54 tests.

About plugin

  • Plugin page: wc-paygol
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-6.2.2
  • WordPress version: 6.3.1
  • First release: May 2, 2020
  • Latest release: Jul 6, 2023
  • Number of updates: 10
  • Update frequency: every 116.0 days
  • Top authors: domisiding (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,563 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.04MB] [CPU: ▼8.98ms] Passed 4 tests

This is a short check of server-side resources used by Gateway Paygol Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.85 ▲0.69
Dashboard /wp-admin3.35 ▲0.0049.13 ▼15.87
Posts /wp-admin/edit.php3.46 ▲0.1151.18 ▼0.72
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.58 ▼17.98
Media Library /wp-admin/upload.php3.27 ▲0.0439.02 ▼1.35

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Gateway Paygol Integration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.06 ▼0.322.09 ▲0.2544.48 ▼1.04
Dashboard /wp-admin2,213 ▲335.55 ▼0.1285.00 ▼5.0777.84 ▲32.18
Posts /wp-admin/edit.php2,112 ▲121.99 ▼0.0334.72 ▼2.3833.70 ▼1.33
Add New Post /wp-admin/post-new.php1,556 ▲2823.20 ▼0.12724.99 ▲26.3356.93 ▼0.29
Media Library /wp-admin/upload.php1,412 ▲124.11 ▼0.03105.45 ▼14.5470.73 ▲23.74

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-paygol/pg_integration_gateway_class.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (25 tag instead of maximum 10)
The official readme.txt is a good inspiration

wc-paygol/pg_integration_main_class.php 77% from 13 tests

This is the main PHP file of "Gateway Paygol Integration" version 1.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-paygol.php" instead of "pg_integration_main_class.php")
  • Description: The description should be shorter than 140 characters (currently 512 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected413 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PO File25862216
PHP31538197

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/WooCommerce-Einstellungen.png12.83KB6.59KB▼ 48.62%
images/icon.png0.53KB0.54KB0.00%
images/paygol_en_white.png5.10KB2.92KB▼ 42.77%
images/Customization-Page.png77.09KB26.36KB▼ 65.80%
images/paygol.png10.51KB3.62KB▼ 65.55%