89% woo-daily-coupons

Code Review | WooCommerce Daily Coupons

WordPress plugin WooCommerce Daily Coupons scored89%from 54 tests.

About plugin

  • Plugin page: woo-daily-coupons
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 26, 2015
  • Latest release: Oct 26, 2015
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: TwentyZeroTwo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,155 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.70ms] Passed 4 tests

Server-side resources used by WooCommerce Daily Coupons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.79 ▼9.53
Dashboard /wp-admin3.36 ▲0.0645.99 ▼0.46
Posts /wp-admin/edit.php3.47 ▲0.1244.55 ▼0.86
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.51 ▼14.31
Media Library /wp-admin/upload.php3.28 ▲0.0533.56 ▼2.09

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Daily Coupons
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.29 ▼1.442.06 ▲0.1443.52 ▲0.68
Dashboard /wp-admin2,206 ▲215.80 ▼0.0895.53 ▼4.9539.83 ▼2.68
Posts /wp-admin/edit.php2,086 ▼32.02 ▲0.0435.34 ▼2.4433.36 ▼1.88
Add New Post /wp-admin/post-new.php1,533 ▲623.22 ▼0.05657.79 ▼28.2251.69 ▼2.45
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0295.76 ▼12.6544.42 ▼0.07

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Requires at least: Invalid version format
  • Tested up to: Invalid version format
The official readme.txt is a good inspiration

woo-daily-coupons/woocommerce-daily-coupons.php 92% from 13 tests

This is the main PHP file of "WooCommerce Daily Coupons" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-daily-coupons.php" instead of "woocommerce-daily-coupons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected201 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10118427201

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.57
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions3
▷ Named functions3100.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