90% first-order-coupon-manager-for-woocommerce

Code Review | First Order Coupon Manager for WooCommerce

WordPress plugin First Order Coupon Manager for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: first-order-coupo...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 26, 2022
  • Latest release: Jul 25, 2023
  • Number of updates: 19
  • Update frequency: every 28.7 days
  • Top authors: ashrafulsarkar (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /4,500 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.08ms] Passed 4 tests

An overview of server-side resources used by First Order Coupon Manager for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0339.62 ▼1.07
Dashboard /wp-admin3.37 ▲0.0346.11 ▼4.61
Posts /wp-admin/edit.php3.42 ▲0.0348.37 ▲0.29
Add New Post /wp-admin/post-new.php5.95 ▲0.0390.26 ▼6.92
Media Library /wp-admin/upload.php3.29 ▲0.0338.98 ▲0.80

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: no files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for First Order Coupon Manager for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.39 ▼0.991.62 ▲0.0843.45 ▲3.63
Dashboard /wp-admin2,221 ▲335.81 ▼0.2095.32 ▼11.8040.50 ▼4.48
Posts /wp-admin/edit.php2,107 ▲181.97 ▼0.0539.77 ▲4.2237.07 ▲0.82
Add New Post /wp-admin/post-new.php1,551 ▲3722.97 ▲5.56649.39 ▼55.8465.24 ▲6.82
Media Library /wp-admin/upload.php1,406 ▲214.25 ▲0.0198.86 ▼0.8946.36 ▲6.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: first order, woocommerce coupon, order amount, woocommerce discount, first order coupon...

first-order-coupon-manager-for-woocommerce/first-order-coupon-manager-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "First Order Coupon Manager for WooCommerce" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected219 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12738123
PO File2222696

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin