99% first-order-discount-woocommerce

Code Review | First Order Discount Woocommerce

WordPress plugin First Order Discount Woocommerce scored 99% from 54 tests.

About plugin

  • Plugin page: first-order-disco...
  • Plugin version: 1.19
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6.0
  • WordPress version: 5.8.1
  • First release: Aug 18, 2017
  • Latest release: May 27, 2021
  • Number of updates: 59
  • Update frequency: every 23.4 days
  • Top authors: vidishp (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

2,000+ active / 24,216 total downloads


Plugin footprint Passed 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.00MB] [CPU: ▼141.43ms] Passed 4 tests

An overview of server-side resources used by First Order Discount Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1240.48 ▲10.55
Dashboard /wp-admin3.07 ▲0.0144.44 ▼2.42
Posts /wp-admin/edit.php3.12 ▲0.0145.39 ▲3.53
Add New Post /wp-admin/post-new.php5.43 ▼0.0195.14 ▼567.62
Media Library /wp-admin/upload.php3.01 ▲0.0136.75 ▲0.81

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by First Order Discount Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.28 ▲0.619.78 ▲1.0051.09 ▲2.29
Dashboard /wp-admin2,973 ▲425.91 ▼0.09143.54 ▼13.87110.05 ▼10.62
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0166.42 ▼0.9889.51 ▲0.71
Add New Post /wp-admin/post-new.php1,683 ▼018.76 ▲2.50387.08 ▼0.13106.05 ▼1.32
Media Library /wp-admin/upload.php1,807 ▼35.02 ▼0.01149.34 ▼10.78119.18 ▼8.18

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: free gift, woocommerce discount, discount, order discount, first order discount

first-order-discount-woocommerce/first-order-discount-woocommerce.php 85% from 13 tests

The main file in "First Order Discount Woocommerce" v. 1.19 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "4.0")
  • Description: Please keep the plugin description shorter than 140 characters (currently 207 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin5,538 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions8100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin