89% atarapay-woocommerce

Code Review | AtaraPay WooCommerce Payment Gateway

WordPress plugin AtaraPay WooCommerce Payment Gateway scored 89% from 54 tests.

About plugin

  • Plugin page: atarapay-woocommerce
  • Plugin version: 2.0.10
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 11, 2020
  • Latest release: Sep 1, 2023
  • Number of updates: 32
  • Update frequency: every 36.8 days
  • Top authors: atarapay (93.75%)damilare4atara (9.38%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,667 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.01MB] [CPU: ▼6.43ms] Passed 4 tests

Server-side resources used by AtaraPay WooCommerce Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.07 ▼4.52
Dashboard /wp-admin3.32 ▲0.0143.42 ▼6.21
Posts /wp-admin/edit.php3.37 ▲0.0148.26 ▲2.88
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.04 ▼17.88
Media Library /wp-admin/upload.php3.24 ▲0.0138.04 ▲5.25

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for AtaraPay WooCommerce Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.59 ▼0.644.28 ▲2.7040.75 ▼0.20
Dashboard /wp-admin2,214 ▲265.83 ▼0.05101.85 ▼8.9940.50 ▲0.12
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0339.87 ▲5.9437.49 ▲3.94
Add New Post /wp-admin/post-new.php1,543 ▲1423.36 ▲4.89657.83 ▲25.3050.18 ▼6.36
Media Library /wp-admin/upload.php1,396 ▲174.22 ▲0.0594.54 ▼5.7640.35 ▼3.30

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === atarapay-woocommerce === )
The official readme.txt is a good inspiration

atarapay-woocommerce/atarapay-woo.php 77% from 13 tests

Analyzing the main PHP file in "AtaraPay WooCommerce Payment Gateway" version 2.0.10
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("atarapay-woocommerce.php" instead of "atarapay-woo.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.6" instead of "4.6.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,369 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP167772372,267
JavaScript46799
CSS1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity31.90
▷ Minimum class complexity5.00
▷ Maximum class complexity107.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods92
▷ Static methods77.61%
▷ Public methods9198.91%
▷ Protected methods11.09%
▷ Private methods00.00%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants18
▷ Global constants1161.11%
▷ Class constants738.89%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.19MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png1.53KB0.96KB▼ 37.06%
assets/images/atarapay.png7.41KB3.13KB▼ 57.75%
assets/images/screenshot-1.png181.41KB52.44KB▼ 71.09%