78% groupon-master

Code Review | TechGasp Coupon Master

WordPress plugin TechGasp Coupon Master scored78%from 54 tests.

About plugin

  • Plugin page: groupon-master
  • Plugin version: 5.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: Dec 12, 2013
  • Latest release: Mar 11, 2021
  • Number of updates: 43
  • Update frequency: every 61.5 days
  • Top authors: TechGasp (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /7,849 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.85ms] Passed 4 tests

This is a short check of server-side resources used by TechGasp Coupon Master
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.26 ▼5.41
Dashboard /wp-admin3.38 ▲0.0348.18 ▼17.63
Posts /wp-admin/edit.php3.49 ▲0.1448.12 ▼1.61
Add New Post /wp-admin/post-new.php5.96 ▲0.0789.42 ▼12.79
Media Library /wp-admin/upload.php3.30 ▲0.0731.31 ▼3.57
Add-ons /wp-admin/admin.php?page=groupon-master-admin-addons3.2933.60
Coupon Master /wp-admin/admin.php?page=groupon-master3.2934.96

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_groupon_master_widget_deals
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_groupon_master_widget_buttons

Browser metrics Passed 4 tests

A check of browser resources used by TechGasp Coupon Master
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2914.34 ▼0.251.76 ▼0.0741.96 ▼1.01
Dashboard /wp-admin2,221 ▲445.55 ▲0.0294.49 ▲2.8265.65 ▲20.35
Posts /wp-admin/edit.php2,133 ▲331.99 ▲0.0438.90 ▼1.0632.68 ▼4.42
Add New Post /wp-admin/post-new.php1,563 ▲3723.13 ▲0.09760.93 ▲129.2852.87 ▼2.73
Media Library /wp-admin/upload.php1,429 ▲264.18 ▼0.1697.13 ▼9.5978.69 ▲32.91
Add-ons /wp-admin/admin.php?page=groupon-master-admin-addons1,0071.9925.1433.99
Coupon Master /wp-admin/admin.php?page=groupon-master1,7616.64147.82106.05

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
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_groupon_master_widget_deals
    • theysaidso_admin_options
    • widget_groupon_master_widget_buttons
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/groupon-master/includes/groupon-master-admin-table-header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/groupon-master/includes/groupon-master-widget-buttons.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/groupon-master/includes/groupon-master-admin-table-news.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/groupon-master/includes/groupon-master-admin-addons-table.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/groupon-master/includes/groupon-master-admin-addons.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/groupon-master/includes/groupon-master-widget-groupon-deals.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/groupon-master/includes/groupon-master-admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/groupon-master/groupon-master.php:54

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=groupon-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=groupon-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
    • > GET request to /wp-admin/admin.php?page=groupon-master
    • > Deprecation (warning) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/yD/r/CxzjCMQABR5.js?_nc_x=Ij3Wp8lg5Kz 271 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=groupon-master
    • > Console-api (severe) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/yD/r/CxzjCMQABR5.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

groupon-master/groupon-master.php Passed 13 tests

Analyzing the main PHP file in "TechGasp Coupon Master" version 5.1.4
113 characters long description:
Easy to use bombastic plugin that will be a great source of income for any wordpress webmaster using groupon api.

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
No dangerous file extensions were detected467 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP103067467

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
10 PNG files occupy 0.29MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/techgasp-admin-addons-widgets.png17.08KB16.02KB▼ 6.22%
images/techgasp-groupon-button.png9.25KB4.72KB▼ 48.94%
images/techgasp-check-yes.png22.22KB7.59KB▼ 65.83%
images/techgasp-admin-addons-updater.png14.03KB13.02KB▼ 7.21%
images/techgasp-admin-addons-shortcodes.png21.28KB20.24KB▼ 4.91%