89% woo-airbuy-gateway

Code Review | WooCommerce Airbuy Gateway

WordPress plugin WooCommerce Airbuy Gateway scored89%from 54 tests.

About plugin

  • Plugin page: woo-airbuy-gateway
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Apr 19, 2018
  • Latest release: Oct 13, 2022
  • Number of updates: 29
  • Update frequency: every 56.5 days
  • Top authors: kabztyrogr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,256 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.84ms] Passed 4 tests

A check of server-side resources used by WooCommerce Airbuy Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0046.07 ▲3.82
Dashboard /wp-admin3.31 ▲0.0052.56 ▼2.72
Posts /wp-admin/edit.php3.36 ▲0.0047.16 ▼5.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.13 ▼10.76
Media Library /wp-admin/upload.php3.23 ▲0.0033.92 ▼0.17

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Airbuy Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.001.67 ▼0.1746.58 ▲1.42
Dashboard /wp-admin2,195 ▲185.61 ▲0.0199.66 ▼3.4742.55 ▼3.19
Posts /wp-admin/edit.php2,100 ▼31.98 ▲0.0235.06 ▼5.0532.09 ▼4.99
Add New Post /wp-admin/post-new.php1,526 ▼023.28 ▲0.23651.75 ▼43.7458.43 ▼5.77
Media Library /wp-admin/upload.php1,394 ▼64.20 ▼0.00104.99 ▼7.6744.65 ▼2.48

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Requires php: Version format is invalid
Please take inspiration from this readme.txt

woo-airbuy-gateway/woocommerce-airbuy-gateway.php 77% from 13 tests

The principal PHP file in "WooCommerce Airbuy Gateway" v. 2.0.0 is loaded by WordPress automatically on each request
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
  • Domain Path: The domain path folder was not found ("/i18n/languages/")
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-airbuy-gateway.php" instead of "woocommerce-airbuy-gateway.php")

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
Good job! No executable or dangerous file extensions detected202 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP175104202

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin