89% alfacoins-for-woocommerce

Code Review | ALFAcoins for WooCommerce

WordPress plugin ALFAcoins for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: alfacoins-for-woo...
  • Plugin version: 0.10
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 31, 2017
  • Latest release: Sep 16, 2019
  • Number of updates: 12
  • Update frequency: every 80.1 days
  • Top authors: webt3ch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 4,451 total downloads


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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by ALFAcoins for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.00 ▲0.42
Dashboard /wp-admin3.31 ▲0.0054.13 ▲6.64
Posts /wp-admin/edit.php3.36 ▲0.0044.14 ▼3.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.33 ▼7.62
Media Library /wp-admin/upload.php3.23 ▲0.0035.11 ▲1.66

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

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

Browser metrics Passed 4 tests

ALFAcoins for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.28 ▼1.015.92 ▲4.3449.28 ▲4.91
Dashboard /wp-admin2,209 ▲214.79 ▼0.2299.63 ▼8.6340.22 ▼0.40
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0334.46 ▲1.1033.96 ▼1.59
Add New Post /wp-admin/post-new.php1,542 ▲918.55 ▼4.47595.74 ▼59.7970.71 ▲16.14
Media Library /wp-admin/upload.php1,391 ▲64.22 ▲0.0097.17 ▼2.5641.77 ▼2.47

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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 just a short smoke test looking for browser issues
Everything seems fine on the user side


Plugin configuration 90% 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (When selected, this is how the payment option will appear) image missing
  • Tags: You are using too many tags: 16 tag instead of maximum 10
You can look at the official readme.txt

alfacoins-for-woocommerce/class-wc-gateway-alfacoins.php 92% from 13 tests

"ALFAcoins for WooCommerce" version 0.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("alfacoins-for-woocommerce.php" instead of "class-wc-gateway-alfacoins.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
There were no executable files found in this plugin710 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity77.00
▷ Minimum class complexity77.00
▷ Maximum class complexity77.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.36MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.png112.90KB30.91KB▼ 72.62%
assets/img/icon.png4.38KB2.11KB▼ 51.87%
assets/screenshot-3.png91.01KB30.98KB▼ 65.96%
assets/screenshot-4.png36.84KB14.25KB▼ 61.31%
assets/screenshot-1.png16.79KB6.90KB▼ 58.91%