93% avecdo-for-woocommerce

Code Review | avecdo for WooCommerce

WordPress plugin avecdo for WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: avecdo-for-woocom...
  • Plugin version: 1.4.18
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.5.1
  • WordPress version: 5.8.1
  • First release: Mar 24, 2017
  • Latest release: Jul 13, 2021
  • Number of updates: 70
  • Update frequency: every 22.4 days
  • Top authors: avecdo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active / 7,046 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.64MB] [CPU: ▼144.10ms] Passed 4 tests

This is a short check of server-side resources used by avecdo for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.7645.57 ▲22.10
Dashboard /wp-admin3.71 ▲0.6551.00 ▼1.30
Posts /wp-admin/edit.php3.75 ▲0.6549.73 ▼1.06
Add New Post /wp-admin/post-new.php6.07 ▲0.64101.54 ▼569.58
Media Library /wp-admin/upload.php3.65 ▲0.6437.38 ▼4.44

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for avecdo for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,725 ▲12916.19 ▲0.239.59 ▼0.4148.36 ▲1.57
Dashboard /wp-admin2,992 ▲555.88 ▼0.22138.36 ▼9.36118.84 ▲5.12
Posts /wp-admin/edit.php2,761 ▲222.69 ▲0.0170.20 ▼1.5295.44 ▲4.05
Add New Post /wp-admin/post-new.php1,619 ▲11918.27 ▼0.50360.23 ▼19.49109.06 ▼15.98
Media Library /wp-admin/upload.php1,829 ▲195.01 ▼0.00160.72 ▼4.16124.86 ▲0.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/avecdo-for-woocommerce/views/activated.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/avecdo-for-woocommerce/views/index.php:12
    • > PHP Notice
      Undefined variable: activation in wp-content/plugins/avecdo-for-woocommerce/views/index.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
  • Screenshots: Add a description for screenshot #3 in avecdo-for-woocommerce/assets to your readme.txt
You can look at the official readme.txt

avecdo-for-woocommerce/avecdo.php 92% from 13 tests

The primary PHP file in "avecdo for WooCommerce" version 1.4.18 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("avecdo-for-woocommerce.php" instead of "avecdo.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
Everything looks great! No dangerous files found in this plugin3,708 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP257451,5543,401
CSS1470227
PO File133080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.35
▷ Minimum class complexity1.00
▷ Maximum class complexity236.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods227
▷ Static methods167.05%
▷ Public methods16974.45%
▷ Protected methods229.69%
▷ Private methods3615.86%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants26
▷ Global constants311.54%
▷ Class constants2388.46%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/activation-flow.png26.44KB13.29KB▼ 49.75%
assets/images/avecdo-logo.png31.29KB13.01KB▼ 58.43%