10% greedycoupon

Code Review | GreedyCoupon - Wordpress Coupon Plugin

WordPress plugin GreedyCoupon - Wordpress Coupon Plugin scored10%from 54 tests.

About plugin

  • Plugin page: greedycoupon
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.5
  • WordPress version: 6.3.1
  • First release: Jul 11, 2017
  • Latest release: May 13, 2018
  • Number of updates: 17
  • Update frequency: every 18.1 days
  • Top authors: livertigo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,352 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/greedycoupon/greedycoupon.php+162
    Undefined index: gd_permalink

Server metrics [RAM: ▼1.84MB] [CPU: ▼54.13ms] Passed 4 tests

Server-side resources used by GreedyCoupon - Wordpress Coupon Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.314.66 ▼40.62
Dashboard /wp-admin2.17 ▼1.137.08 ▼40.89
Posts /wp-admin/edit.php2.17 ▼1.186.48 ▼40.20
Add New Post /wp-admin/post-new.php2.17 ▼3.716.78 ▼94.79
Media Library /wp-admin/upload.php2.17 ▼1.065.64 ▼28.47
Add New /wp-admin/post-new.php?post_type=greedycoupon2.176.07
All Coupon /wp-admin/edit.php?post_type=greedycoupon2.177.70

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 57 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for GreedyCoupon - Wordpress Coupon Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /7,718 ▲4,98314.88 ▲0.135.98 ▲4.2439.89 ▼11.11
Dashboard /wp-admin6,996 ▲4,8056.02 ▲1.11145.41 ▲39.1774.57 ▲36.08
Posts /wp-admin/edit.php6,899 ▲4,8102.81 ▲0.8273.38 ▲37.4934.83 ▲1.40
Add New Post /wp-admin/post-new.php3,957 ▲2,41818.28 ▼5.05733.94 ▲57.4361.57 ▲4.22
Media Library /wp-admin/upload.php6,190 ▲4,8085.42 ▲1.14142.12 ▲41.1246.74 ▲4.07
Add New /wp-admin/post-new.php?post_type=greedycoupon7,2307.68245.19128.93
All Coupon /wp-admin/edit.php?post_type=greedycoupon5,8602.7169.1629.73

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/greedycoupon/greedycoupon.php+162
    Undefined index: gd_permalink
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=greedycoupon
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/greedycoupon/greedycoupon.php+162
    Undefined index: gd_permalink
    • > GET request to /wp-admin/post-new.php?post_type=greedycoupon
    • > Notice in wp-content/plugins/greedycoupon/admin/coupon-meta.php+227
    Undefined index: coupon_show
    • > GET request to /wp-admin/post-new.php?post_type=greedycoupon
    • > Notice in wp-content/plugins/greedycoupon/admin/coupon-meta.php+261
    Undefined index: coupon_affiliate_link
    • > GET request to /wp-admin/post-new.php?post_type=greedycoupon
    • > Notice in wp-content/plugins/greedycoupon/admin/coupon-meta.php+297
    Undefined index: coupon_store_name
    • > GET request to /wp-admin/post-new.php?post_type=greedycoupon
    • > Notice in wp-content/plugins/greedycoupon/admin/coupon-meta.php+333
    Undefined index: coupon_short_desc
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=greedycoupon
    • > Notice in wp-content/plugins/greedycoupon/admin/coupon-meta.php+457
    Undefined index: coupon_count
    • > GET request to /wp-admin/post-new.php?post_type=greedycoupon
    • > Notice in wp-content/plugins/greedycoupon/admin/coupon-meta.php+521
    Undefined index: coupon_0_discount
    • > GET request to /wp-admin/post-new.php?post_type=greedycoupon
    • > Notice in wp-content/plugins/greedycoupon/admin/coupon-meta.php+159
    Undefined variable: o

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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (2.), #3 (4.), #5 ()
The official readme.txt might help

greedycoupon/greedycoupon.php Passed 13 tests

The main PHP script in "GreedyCoupon - Wordpress Coupon Plugin" version 1.0.5 is automatically included on every request by WordPress
67 characters long description:
GreedyCoupon is an customized coupon plugin for wordpress websites.

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
Success! There were no dangerous files found in this plugin7,411 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript69601,8363,879
CSS1340952,485
PHP1083136853
XML1100106
Markdown137069
Sass16019

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 1.03MB with 0.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/arrow-left.png0.21KB0.21KB0.00%
assets/images/arrow-right.png0.21KB0.20KB▼ 4.19%
assets/images/discount-sticker.png30.23KB2.40KB▼ 92.05%
screenshot-2.png406.05KB141.00KB▼ 65.27%
(invalid) screenshot-5.png30.79KB0.00KB▼ 100.00%