78% advanced-coupon-conditions-for-woocommerce

Code Review | Advanced Coupon Conditions for Woocommerce

WordPress plugin Advanced Coupon Conditions for Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: advanced-coupon-c...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Nov 21, 2016
  • Latest release: Jan 10, 2017
  • Number of updates: 5
  • Update frequency: every 9.4 days
  • Top authors: dcurasi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,358 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲1.41ms] Passed 4 tests

Server-side resources used by Advanced Coupon Conditions for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.69 ▲3.59
Dashboard /wp-admin3.41 ▲0.1044.54 ▼2.79
Posts /wp-admin/edit.php3.52 ▲0.1652.62 ▲4.56
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.47 ▲3.50
Media Library /wp-admin/upload.php3.33 ▲0.1033.23 ▲1.35

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Advanced Coupon Conditions for Woocommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲18013.62 ▼0.735.42 ▲3.7142.03 ▼7.78
Dashboard /wp-admin2,224 ▲364.86 ▼0.06108.21 ▲3.7841.38 ▼3.18
Posts /wp-admin/edit.php2,109 ▲172.05 ▲0.0043.30 ▲4.4437.59 ▲0.10
Add New Post /wp-admin/post-new.php1,527 ▼623.31 ▼0.06605.83 ▼1.5543.83 ▼10.71
Media Library /wp-admin/upload.php1,406 ▲214.20 ▲0.0293.53 ▼5.1540.16 ▼3.89

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/advanced-coupon-conditions-for-woocommerce/public/partials/dc-accfw-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-coupon-conditions-for-woocommerce/admin/partials/dc-accfw-admin-display.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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
Please fix the following attributes:
  • Tags: There are too many tags (27 tag instead of maximum 10)
Please take inspiration from this readme.txt

advanced-coupon-conditions-for-woocommerce/dc-accfw.php 85% from 13 tests

This is the main PHP file of "Advanced Coupon Conditions for Woocommerce" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-coupon-conditions-for-woocommerce.php" instead of "dc-accfw.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin465 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12148589379
PO File1151674
CSS2186
JavaScript24546

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.29
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods36
▷ Static methods1336.11%
▷ Public methods3186.11%
▷ Protected methods00.00%
▷ Private methods513.89%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin