84% amwal-checkout

Code Review | Amwal Checkout

WordPress plugin Amwal Checkout scored84%from 54 tests.

About plugin

  • Plugin page: amwal-checkout
  • Plugin version: 1.0.52
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.2-6.4
  • WordPress version: 6.3.1
  • First release: Oct 14, 2022
  • Latest release: Nov 7, 2023
  • Number of updates: 67
  • Update frequency: every 5.8 days
  • Top authors: mahmoodamwal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server-side resources used by Amwal Checkout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.45 ▼2.23
Dashboard /wp-admin3.20 ▼0.1032.42 ▼19.28
Posts /wp-admin/edit.php3.27 ▼0.0935.69 ▼13.44
Add New Post /wp-admin/post-new.php5.44 ▼0.4470.20 ▼18.48
Media Library /wp-admin/upload.php3.21 ▼0.0233.37 ▼1.18

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 82 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
amwal_valid_app_id
widget_theysaidso_widget
db_upgraded
wc_hide_shipping_options

Browser metrics Passed 4 tests

An overview of browser requirements for Amwal Checkout
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.72 ▲0.401.82 ▼0.0343.96 ▼0.78
Dashboard /wp-admin2,195 ▲185.57 ▼0.0889.93 ▼9.4738.16 ▼5.33
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0139.42 ▲1.2236.17 ▼0.83
Add New Post /wp-admin/post-new.php1,533 ▲723.32 ▼0.40698.34 ▼3.8554.57 ▼9.49
Media Library /wp-admin/upload.php1,403 ▼04.23 ▲0.01104.64 ▲3.1043.96 ▼1.75

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
The following issues need your attention
  • 42× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function amwalwc_load_template() in wp-content/plugins/amwal-checkout/templates/admin/tabs/amwal-options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/amwal-checkout/includes/button.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function amwalwc_load_template() in wp-content/plugins/amwal-checkout/templates/admin/tabs/amwal-app-info.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function amwalwc_load_template() in wp-content/plugins/amwal-checkout/templates/admin/tabs/amwal-styles.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Amwal\\Http\\Controllers\\Controller' not found in wp-content/plugins/amwal-checkout/includes/Http/Controllers/CompleteOrderController.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'AmwalWC\\Admin\\Fields\\Field' not found in wp-content/plugins/amwal-checkout/includes/admin/fields/class-select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'AmwalWC\\Admin\\Fields\\Field' not found in wp-content/plugins/amwal-checkout/includes/admin/fields/class-checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Amwal\\Http\\Controllers\\Controller' not found in wp-content/plugins/amwal-checkout/includes/Http/Controllers/CancelOrderController.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function amwalwc_get_settings_tabs() in wp-content/plugins/amwal-checkout/templates/admin/amwal-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function amwalwc_load_template() in wp-content/plugins/amwal-checkout/templates/admin/tabs/amwal-shipping.php:8

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: one click checkout, amwal, woocommerce, woocommerce checkout, checkout...

amwal-checkout/amwal.php 92% from 13 tests

The primary PHP file in "Amwal Checkout" version 1.0.52 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("amwal-checkout.php" instead of "amwal.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
Everything looks great! No dangerous files found in this plugin5,315 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
PHP628251,4784,241
CSS1653327
TypeScript1242292
PO File19293231
SVG20096
JavaScript461268
JSON30060

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.87
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes31
▷ Abstract classes26.45%
▷ Concrete classes2993.55%
▷ Final classes931.03%
Methods160
▷ Static methods2515.62%
▷ Public methods12779.38%
▷ Protected methods2113.12%
▷ Private methods127.50%
Functions134
▷ Named functions12694.03%
▷ Anonymous functions85.97%
Constants71
▷ Global constants5881.69%
▷ Class constants1318.31%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logos.png5.75KB3.31KB▼ 42.48%
assets/images/logo.png17.65KB8.38KB▼ 52.54%