78% woo-alltobill-gateway

Code Review | Woo Alltobill Payment Gateway

WordPress plugin Woo Alltobill Payment Gateway scored 78% from 54 tests.

About plugin

  • Plugin page: woo-alltobill-gat...
  • Plugin version: 1.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Mar 2, 2018
  • Latest release: Mar 2, 2018
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: alltobill (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 899 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.04MB] [CPU: ▼0.90ms] Passed 4 tests

A check of server-side resources used by Woo Alltobill Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.01 ▼4.64
Dashboard /wp-admin3.35 ▲0.0453.01 ▲1.81
Posts /wp-admin/edit.php3.40 ▲0.0451.21 ▲1.00
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.93 ▼0.39
Media Library /wp-admin/upload.php3.27 ▲0.0336.59 ▲0.42

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Alltobill Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.19 ▼1.552.09 ▲0.2744.92 ▲6.13
Dashboard /wp-admin2,206 ▲35.84 ▲0.98105.06 ▼34.0240.87 ▼1.61
Posts /wp-admin/edit.php2,092 ▼02.03 ▼0.0144.09 ▲4.2334.90 ▼0.97
Add New Post /wp-admin/post-new.php1,533 ▼023.19 ▼0.04646.51 ▼38.7455.27 ▲3.81
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.0195.53 ▼5.6741.44 ▼1.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 13× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/examples/GatewayDelete.php
    • > /wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/examples/InvoiceGetOne.php
    • > /wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/examples/PageGetOne.php
    • > /wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/examples/AuthTokenCreate.php
    • > /wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/examples/SubscriptionCancel.php
    • > /wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/examples/InvoiceDelete.php
    • > /wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/examples/SubscriptionUpdate.php
    • > /wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/examples/GatewayGetOne.php
    • > /wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/examples/PageGetAll.php
    • > /wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/examples/InvoiceCreate.php
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Alltobill\\Models\\Base' not found in wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/lib/Alltobill/Models/Request/Gateway.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-alltobill-gateway/woo-alltobill-gateway.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Alltobill\\Models\\Base' not found in wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/lib/Alltobill/Models/Request/Invoice.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Alltobill\\CommunicationAdapter\\AbstractCommunication' not found in wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/lib/Alltobill/CommunicationAdapter/CurlCommunication.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Alltobill\\Models\\Request\\Subscription' not found in wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/lib/Alltobill/Models/Response/Subscription.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Alltobill\\Models\\Base' not found in wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/lib/Alltobill/Models/Request/Subscription.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Alltobill\\Models\\Request\\Invoice' not found in wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/lib/Alltobill/Models/Response/AuthToken.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Alltobill\\Models\\Base' not found in wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/lib/Alltobill/Models/Request/Page.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-alltobill-gateway/includes/settings-alltobill.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Alltobill\\Models\\Request\\Gateway' not found in wp-content/plugins/woo-alltobill-gateway/alltobill-php-master/lib/Alltobill/Models/Response/Gateway.php:12

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

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #5 is missing in woo-alltobill-gateway/assets to your readme.txt
  • Tags: Please delete some tags, you are using 25 tag instead of maximum 10
The official readme.txt is a good inspiration

woo-alltobill-gateway/woo-alltobill-gateway.php Passed 13 tests

The main file in "Woo Alltobill Payment Gateway" v. 1.6.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
67 characters long description:
Accept many different payment methods on your store using Alltobill

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin4,209 lines of code in 93 files:
LanguageFilesBlank linesComment linesLines of code
SVG6010462,672
PHP313281,0671,453
Markdown120059
JSON10025

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.47
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.24
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes17
▷ Abstract classes211.76%
▷ Concrete classes1588.24%
▷ Final classes00.00%
Methods162
▷ Static methods00.00%
▷ Public methods15897.53%
▷ Protected methods42.47%
▷ Private methods00.00%
Functions17
▷ Named functions211.76%
▷ Anonymous functions1588.24%
Constants14
▷ Global constants00.00%
▷ Class constants14100.00%
▷ Public constants14100.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
There are no PNG files in this plugin