84% allpay-aio-for-woocommerce

Code Review | Allpay AIO for WooCommerce

WordPress plugin Allpay AIO for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: allpay-aio-for-wo...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7.5
  • WordPress version: 6.3.1
  • First release: Apr 29, 2015
  • Latest release: Dec 19, 2019
  • Number of updates: 30
  • Update frequency: every 57.6 days
  • Top authors: innovext (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /8,177 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼14.83ms] Passed 4 tests

Server-side resources used by Allpay AIO for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.07 ▼5.63
Dashboard /wp-admin3.31 ▼0.0344.15 ▼21.54
Posts /wp-admin/edit.php3.36 ▲0.0044.24 ▼3.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.90 ▼28.71
Media Library /wp-admin/upload.php3.24 ▲0.0033.28 ▼0.81

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Allpay AIO for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.33 ▼1.051.69 ▼0.0642.29 ▼5.53
Dashboard /wp-admin2,209 ▲215.86 ▼0.0299.50 ▼5.7939.13 ▼4.70
Posts /wp-admin/edit.php2,071 ▼182.06 ▲0.1035.59 ▼2.8132.12 ▼7.17
Add New Post /wp-admin/post-new.php1,533 ▲1223.10 ▼0.06663.26 ▼9.9555.73 ▼0.19
Media Library /wp-admin/upload.php1,382 ▼04.15 ▼0.0799.22 ▼4.0242.64 ▼1.00

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/allpay-aio-for-woocommerce/includes/class-wc-gateway-allpay-aio-addon.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (設定畫面)
The official readme.txt is a good inspiration

allpay-aio-for-woocommerce/class-allpay-aio.php 92% from 13 tests

The entry point to "Allpay AIO for WooCommerce" version 1.2.1 is a PHP file that has certain tags in its header comment area
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 ("allpay-aio-for-woocommerce.php" instead of "class-allpay-aio.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,134 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP52513451,104
PO File19230

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity78.50
▷ Minimum class complexity29.00
▷ Maximum class complexity128.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods40
▷ Static methods1640.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.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
3 PNG files occupy 0.20MB with 0.11MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png196.48KB61.21KB▼ 68.85%
icon/allpay-logo.png4.67KB2.03KB▼ 56.45%
icon/ecpay-logo.png3.92KB2.33KB▼ 40.38%