94% coupon-maker

Code Review | Coupon Maker

WordPress plugin Coupon Maker scored 94% from 54 tests.

About plugin

  • Plugin page: coupon-maker
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 5.8.1
  • First release: Sep 23, 2015
  • Latest release: Sep 23, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: coupondaddy.in (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,924 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼141.70ms] Passed 4 tests

Analyzing server-side resources used by Coupon Maker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.61 ▲12.73
Dashboard /wp-admin3.06 ▲0.0142.51 ▼5.14
Posts /wp-admin/edit.php3.11 ▲0.0145.18 ▲1.34
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.39 ▼561.77
Media Library /wp-admin/upload.php3.01 ▲0.0030.26 ▼1.21

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Coupon Maker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.74 ▲0.239.33 ▲0.3449.31 ▲1.61
Dashboard /wp-admin2,970 ▲365.93 ▼0.19133.38 ▼8.74105.46 ▼5.35
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0065.95 ▲0.8890.96 ▼0.20
Add New Post /wp-admin/post-new.php1,672 ▼1118.87 ▲0.06365.80 ▼9.55101.95 ▼2.80
Media Library /wp-admin/upload.php1,810 ▼05.05 ▼0.02151.94 ▲6.26112.78 ▲0.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/coupon-maker/includes/class-coupon-maker-loader.php
    • > /wp-content/plugins/coupon-maker/coupon-maker.php
    • > /wp-content/plugins/coupon-maker/public/partials/coupon-maker-public-display.php
    • > /wp-content/plugins/coupon-maker/public/class-coupon-maker-public.php
    • > /wp-content/plugins/coupon-maker/includes/class-coupon-maker.php

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: code, generator, coupon

coupon-maker/coupon-maker.php 92% from 13 tests

Analyzing the main PHP file in "Coupon Maker" version 1.0.0
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 159 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
Everything looks great! No dangerous files found in this plugin330 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7100431186
CSS1158113
JavaScript14631

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods1777.27%
▷ Protected methods00.00%
▷ Private methods522.73%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png1.26KB1.02KB▼ 19.23%
screenshot-1.png3.94KB2.38KB▼ 39.55%