83% azampay

Code Review | WooCommerce AzamPay

WordPress plugin WooCommerce AzamPay scored83%from 54 tests.

About plugin

  • Plugin page: azampay
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2022
  • Latest release: Oct 12, 2023
  • Number of updates: 33
  • Update frequency: every 10.2 days
  • Top authors: azampay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.01ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce AzamPay
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.12 ▲2.11
Dashboard /wp-admin3.32 ▲0.0244.82 ▼4.78
Posts /wp-admin/edit.php3.38 ▲0.0246.19 ▼1.49
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.94 ▼32.98
Media Library /wp-admin/upload.php3.25 ▲0.0233.88 ▼0.78

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce AzamPay
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.14 ▼0.212.04 ▲0.4746.20 ▲3.85
Dashboard /wp-admin2,199 ▲225.49 ▼0.0982.94 ▼9.3640.23 ▲4.83
Posts /wp-admin/edit.php2,110 ▲131.97 ▼0.0335.91 ▲0.0433.20 ▼5.36
Add New Post /wp-admin/post-new.php1,533 ▲423.70 ▲0.38641.54 ▼17.5963.22 ▼2.71
Media Library /wp-admin/upload.php1,404 ▲14.16 ▼0.0396.02 ▼2.9041.21 ▼3.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/azampay/includes/class-woo-azampay-gateway.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add images for these screenshots: #1 (The AzamPay Gateway settings screen is used to configure the main Azampay gateway.), #2 (Checkout page that offers a range of payment methods such as local and alternative payment methods.)
Please take inspiration from this readme.txt

azampay/woocommerce-azampay.php 77% from 13 tests

The main PHP script in "WooCommerce AzamPay" version 1.0.5 is automatically included on every request by WordPress
The following require your attention:
  • 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
  • Requires at least: The required version number must match the one declared in readme.txt ("6.0" instead of "6.0.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("azampay.php" instead of "woocommerce-azampay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin906 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP2200210743
CSS116078
JavaScript110073
SVG40012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity107.00
▷ Minimum class complexity107.00
▷ Maximum class complexity107.00
Average method complexity6.30
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1680.00%
▷ Protected methods15.00%
▷ Private methods315.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/public/images/logo.png5.56KB2.95KB▼ 46.97%