83% auto-coupons-for-woocommerce

Code Review | Auto Coupons for WooCommerce

WordPress plugin Auto Coupons for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: auto-coupons-for-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 11, 2019
  • Latest release: Apr 11, 2019
  • Number of updates: 10
  • Update frequency: every 0.2 days
  • Top authors: ahuseyn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /541 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Auto Coupons for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.50 ▼7.27
Dashboard /wp-admin3.32 ▼0.0243.82 ▼18.60
Posts /wp-admin/edit.php3.37 ▲0.0244.49 ▼2.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.12 ▼21.00
Media Library /wp-admin/upload.php3.24 ▲0.0231.92 ▼2.83

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Auto Coupons for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.25 ▼1.142.00 ▲0.2441.33 ▼4.64
Dashboard /wp-admin2,210 ▲184.91 ▼0.07108.87 ▲4.2939.90 ▼4.39
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0435.31 ▼5.9833.50 ▼4.99
Add New Post /wp-admin/post-new.php1,546 ▲2618.34 ▼4.91593.76 ▼75.8752.52 ▼3.27
Media Library /wp-admin/upload.php1,386 ▼54.21 ▲0.0495.78 ▼4.2443.61 ▼1.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/auto-coupons-for-woocommerce/admin.php
    • > /wp-content/plugins/auto-coupons-for-woocommerce/main.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: The official readme.txt is a good inspiration

auto-coupons-for-woocommerce/main.php 85% from 13 tests

"Auto Coupons for WooCommerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("auto-coupons-for-woocommerce.php" instead of "main.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
Success! There were no dangerous files found in this plugin258 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35417258

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected