90% gateway-aqayepardakht-for-woocommerce

Code Review | Gateway AqayePardakht for Woocommerce

WordPress plugin Gateway AqayePardakht for Woocommerce scored90%from 54 tests.

About plugin

  • Plugin page: gateway-aqayepard...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Sep 4, 2020
  • Latest release: Nov 12, 2022
  • Number of updates: 13
  • Update frequency: every 61.5 days
  • Top authors: aqayepardakht (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /4,974 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Gateway AqayePardakht for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.95 ▲3.22
Dashboard /wp-admin3.38 ▲0.0848.16 ▼10.05
Posts /wp-admin/edit.php3.44 ▲0.0854.39 ▲0.10
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.30 ▼21.06
Media Library /wp-admin/upload.php3.31 ▲0.0837.00 ▲2.67

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Gateway AqayePardakht for Woocommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.37 ▼0.281.90 ▼0.3546.32 ▲4.42
Dashboard /wp-admin2,198 ▲215.66 ▼0.0182.98 ▼16.9238.47 ▼9.08
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0141.72 ▲5.7034.86 ▼2.95
Add New Post /wp-admin/post-new.php1,546 ▲123.46 ▲0.30655.26 ▼20.8356.62 ▼2.15
Media Library /wp-admin/upload.php1,403 ▲34.31 ▲0.09104.68 ▼0.5447.08 ▲0.50

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: e-commerce, woocommerce, farsi, payment gateway, woocommerce payment...

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

"Gateway AqayePardakht for Woocommerce" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gateway-aqayepardakht-for-woocommerce.php" instead of "index.php")

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 plugin362 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2907362

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.31
Average class complexity58.00
▷ Minimum class complexity58.00
▷ Maximum class complexity58.00
Average method complexity10.50
▷ Minimum method complexity1.00
▷ Maximum method complexity34.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%
Functions2
▷ Named functions2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png1.40KB1.40KB0.00%