90% gift-cards-coupon-input

Code Review | Gift Cards - Coupon Input

WordPress plugin Gift Cards - Coupon Input scored90%from 54 tests.

About plugin

  • Plugin page: gift-cards-coupon...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 8, 2020
  • Latest release: Oct 31, 2023
  • Number of updates: 8
  • Update frequency: every 155.4 days
  • Top authors: jasonkytros (50%)franticpsyx (50%)SomewhereWarm (25%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,503 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼11.41ms] Passed 4 tests

An overview of server-side resources used by Gift Cards - Coupon Input
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.52 ▼7.00
Dashboard /wp-admin3.33 ▼0.0147.89 ▼15.95
Posts /wp-admin/edit.php3.39 ▲0.0245.36 ▼2.73
Add New Post /wp-admin/post-new.php5.92 ▲0.0284.59 ▼16.08
Media Library /wp-admin/upload.php3.26 ▲0.0234.15 ▼6.60

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Gift Cards - Coupon Input: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.20 ▼0.151.67 ▼0.0243.71 ▲1.64
Dashboard /wp-admin2,206 ▲295.62 ▲0.0390.04 ▼11.8139.33 ▼4.00
Posts /wp-admin/edit.php2,111 ▲82.03 ▲0.0235.06 ▲1.3336.87 ▲4.53
Add New Post /wp-admin/post-new.php1,537 ▲1123.18 ▲0.25603.17 ▼9.0053.28 ▲2.80
Media Library /wp-admin/upload.php1,411 ▲84.30 ▲0.1097.83 ▼5.1642.54 ▼2.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
5 plugin tags: input, gift, coupon, woocommerce, cards

gift-cards-coupon-input/gift-cards-coupon-input.php 92% from 13 tests

The main PHP file in "Gift Cards - Coupon Input" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin76 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1348376

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods8100.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected