93% woo-wallet-system

Code Review | Woocommerce Wallet System

WordPress plugin Woocommerce Wallet System scored 93% from 54 tests.

About plugin

  • Plugin page: woo-wallet-system
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0.2
  • WordPress version: 5.8.1
  • First release: Mar 12, 2019
  • Latest release: Apr 5, 2021
  • Number of updates: 6
  • Update frequency: every 126.0 days
  • Top authors: acewebx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,311 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼141.90ms] Passed 4 tests

Analyzing server-side resources used by Woocommerce Wallet System
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.0032.99 ▲0.32
Dashboard /wp-admin3.06 ▲0.0054.56 ▲7.24
Posts /wp-admin/edit.php3.11 ▲0.0051.21 ▲6.15
Add New Post /wp-admin/post-new.php5.42 ▼0.0290.03 ▼572.06
Media Library /wp-admin/upload.php3.00 ▲0.0033.02 ▼2.00

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce Wallet System
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.30 ▲0.749.76 ▼0.4747.52 ▲4.61
Dashboard /wp-admin2,967 ▲336.17 ▲0.26146.77 ▼12.23102.17 ▼6.37
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0067.91 ▼2.1985.72 ▼10.32
Add New Post /wp-admin/post-new.php1,676 ▲17618.78 ▲0.34380.33 ▼5.37112.18 ▲4.69
Media Library /wp-admin/upload.php1,807 ▼05.04 ▼0.00155.40 ▲1.65115.25 ▲0.74

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-wallet-system/public/partials/ace_wallet-public-display.php
    • > /wp-content/plugins/woo-wallet-system/admin/partials/ace_wallet-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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: Screenshot #1 (Wallet option tab in the My Account page.) image not found
The official readme.txt might help

woo-wallet-system/ace_wallet.php 77% from 13 tests

This is the main PHP file of "Woocommerce Wallet System" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-wallet-system.php" instead of "ace_wallet.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin636 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12164543601
JavaScript355435
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin