90% give-coupon-to-friend

Code Review | Give Coupon to Friend

WordPress plugin Give Coupon to Friend scored90%from 54 tests.

About plugin

  • Plugin page: give-coupon-to-fr...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 1, 2020
  • Latest release: Aug 1, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: xavierdeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /400 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.10ms] Passed 4 tests

Server-side resources used by Give Coupon to Friend
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.46 ▲1.68
Dashboard /wp-admin3.33 ▲0.0350.75 ▼0.24
Posts /wp-admin/edit.php3.38 ▲0.0347.44 ▼8.88
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.24 ▼14.95
Media Library /wp-admin/upload.php3.26 ▲0.0335.82 ▼0.31

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Give Coupon to Friend: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.73 ▲0.531.76 ▼0.0343.58 ▲1.25
Dashboard /wp-admin2,209 ▲355.55 ▲0.0284.89 ▼10.9045.65 ▲3.89
Posts /wp-admin/edit.php2,115 ▲151.98 ▼0.0634.49 ▼4.1937.95 ▲0.43
Add New Post /wp-admin/post-new.php1,544 ▲618.47 ▼4.77625.11 ▼0.6476.96 ▲25.61
Media Library /wp-admin/upload.php1,414 ▲174.28 ▲0.09102.43 ▼1.7243.11 ▼3.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: woocommerce, give, regalar, coupon, giveaway...

give-coupon-to-friend/give-coupon-to-friend.php 92% from 13 tests

"Give Coupon to Friend" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected171 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13646139
PO File18832

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin