74% coupon-card

Code Review | Coupon Card

WordPress plugin Coupon Card scored74%from 54 tests.

About plugin

  • Plugin page: coupon-card
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.7.4
  • WordPress version: 6.3.1
  • First release: May 14, 2017
  • Latest release: May 14, 2017
  • Number of updates: 27
  • Update frequency: every 0.3 days
  • Top authors: theayan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /888 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼11.23ms] Passed 4 tests

An overview of server-side resources used by Coupon Card
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0745.09 ▲1.98
Dashboard /wp-admin3.37 ▲0.0251.24 ▼14.21
Posts /wp-admin/edit.php3.42 ▲0.0646.97 ▼9.50
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.77 ▼19.00
Media Library /wp-admin/upload.php3.29 ▲0.0637.74 ▼2.19
Add New /wp-admin/admin.php?page=add-new-coupon-card3.3138.86
All Cards /wp-admin/admin.php?page=coupon-card3.2937.89

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 14 new files
Database: 1 new table, 6 new options
New tables
wp_coupon_card
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Coupon Card
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲19013.67 ▼1.008.67 ▲7.0137.06 ▼4.69
Dashboard /wp-admin2,216 ▲255.86 ▲0.9498.01 ▼4.7471.65 ▲31.08
Posts /wp-admin/edit.php2,114 ▲251.98 ▼0.0834.41 ▼6.1434.47 ▼3.28
Add New Post /wp-admin/post-new.php1,533 ▼023.39 ▲2.25679.18 ▲5.0055.67 ▲10.62
Media Library /wp-admin/upload.php1,404 ▲164.18 ▼0.0494.87 ▼19.3772.38 ▲24.28
Add New /wp-admin/admin.php?page=add-new-coupon-card1,0783.1239.2157.18
All Cards /wp-admin/admin.php?page=coupon-card1,0453.0640.1656.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_coupon_card
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 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 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/coupon-card/inc/functions.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/coupon-card/inc/menu.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: offers, discounts, coupon, promo code

coupon-card/coupon-card.php Passed 13 tests

This is the main PHP file of "Coupon Card" 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
43 characters long description:
Promote Various Coupon And Discount Offers.

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
Success! There were no dangerous files found in this plugin1,835 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS3337211,423
PHP56099307
JavaScript22413105

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions11
▷ Named functions11100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-tag.png0.62KB0.76KB0.00%
images/paypal.png1.52KB1.53KB0.00%