83% avecdo-for-woocommerce

Code Review | avecdo for WooCommerce

WordPress plugin avecdo for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: avecdo-for-woocom...
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Mar 24, 2017
  • Latest release: Oct 10, 2023
  • Number of updates: 84
  • Update frequency: every 28.4 days
  • Top authors: avecdo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /10,260 total downloads

Benchmarks

Plugin footprint 83% from 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.03MB] [CPU: ▼6.17ms] 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.52 ▲0.0538.81 ▲3.28
Dashboard /wp-admin3.34 ▼0.0149.70 ▼9.98
Posts /wp-admin/edit.php3.45 ▲0.0943.32 ▼6.03
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.24 ▼8.24
Media Library /wp-admin/upload.php3.26 ▲0.0334.88 ▼0.41

Server storage [IO: ▲0.31MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
avecdo_version
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

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 /2,807 ▲6114.35 ▲0.071.88 ▲0.2343.56 ▲3.63
Dashboard /wp-admin2,216 ▲395.58 ▼0.0795.88 ▲9.5041.07 ▼1.80
Posts /wp-admin/edit.php2,115 ▲121.98 ▲0.0334.36 ▼5.5831.32 ▼5.29
Add New Post /wp-admin/post-new.php1,541 ▲1323.09 ▼0.16667.76 ▲2.4350.91 ▼7.21
Media Library /wp-admin/upload.php1,421 ▲184.16 ▼0.0495.44 ▼1.9641.86 ▼3.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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/version-selector.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Avecdo\\SDK\\Constants' not found in wp-content/plugins/avecdo-for-woocommerce/views/index.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/avecdo-for-woocommerce/views/activated.php:7

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:
  • Screenshots: Add a description for screenshot #3 in avecdo-for-woocommerce/assets to your readme.txt
  • Tags: There are too many tags (13 tag instead of maximum 10)
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.6.2 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 plugin4,505 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP368991,9254,085
CSS1490233
JSON20087
PO File133080
Markdown36020

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.44
Average class complexity22.88
▷ Minimum class complexity1.00
▷ Maximum class complexity236.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes25
▷ Abstract classes14.00%
▷ Concrete classes2496.00%
▷ Final classes00.00%
Methods273
▷ Static methods3914.29%
▷ Public methods21177.29%
▷ Protected methods228.06%
▷ Private methods4014.65%
Functions14
▷ Named functions1178.57%
▷ Anonymous functions321.43%
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/avecdo-logo.png31.29KB13.01KB▼ 58.43%
assets/images/activation-flow.png26.44KB13.29KB▼ 49.75%