89% auto-coupon-for-woocommerce

Code Review | Auto Coupon For WooCommerce

WordPress plugin Auto Coupon For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: auto-coupon-for-w...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2023
  • Latest release: Oct 1, 2023
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: kobi1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /44 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.50ms] Passed 4 tests

Analyzing server-side resources used by Auto Coupon For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.02 ▼4.36
Dashboard /wp-admin3.33 ▲0.0360.64 ▲8.00
Posts /wp-admin/edit.php3.38 ▲0.0250.09 ▼1.85
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.43 ▼4.55
Media Library /wp-admin/upload.php3.25 ▲0.0238.67 ▲4.75

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/auto-coupon-for-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Auto Coupon For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.49 ▲0.241.72 ▼0.1444.09 ▲0.84
Dashboard /wp-admin2,221 ▲144.83 ▼0.1298.87 ▼22.9040.86 ▼2.64
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0036.82 ▲0.9934.37 ▼3.37
Add New Post /wp-admin/post-new.php1,526 ▼2117.91 ▼5.20631.86 ▼55.2152.41 ▼2.45
Media Library /wp-admin/upload.php1,397 ▼34.25 ▲0.03103.25 ▼10.1343.57 ▼6.67

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: woocommerce, coupons, discount

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

The primary PHP file in "Auto Coupon For WooCommerce" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "5.0.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("auto-coupon-for-woocommerce.php" instead of "woocommerce-auto-coupon.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 plugin164 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11525114
PO File18850

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin