72% gratisfaction-social-contests-referral-loyalty-rewards-program-by-appsmav

Code Review | Gratisfaction- Contests Giveaways Referral Loyalty Rewards and Birthdays Program

WordPress plugin Gratisfaction- Contests Giveaways Referral Loyalty Rewards and Birthdays Program scored72%from 54 tests.

About plugin

  • Plugin page: gratisfaction-soc...
  • Plugin version: 3.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Oct 8, 2015
  • Latest release: Nov 15, 2023
  • Number of updates: 122
  • Update frequency: every 24.3 days
  • Top authors: akashmalik (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

80+ active /15,175 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.02MB] [CPU: ▼10.75ms] Passed 4 tests

A check of server-side resources used by Gratisfaction- Contests Giveaways Referral Loyalty Rewards and Birthdays Program
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.84 ▼4.78
Dashboard /wp-admin3.33 ▼0.0146.42 ▼20.71
Posts /wp-admin/edit.php3.45 ▲0.0943.62 ▼7.71
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.95 ▼9.80
Media Library /wp-admin/upload.php3.26 ▲0.0330.79 ▼3.53
Gratisfaction /wp-admin/options-general.php?page=grappsmav3.2831.94

Server storage [IO: ▲0.89MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
grappsmav_register
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Gratisfaction- Contests Giveaways Referral Loyalty Rewards and Birthdays Program
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4714.25 ▼0.031.73 ▲0.0944.38 ▲0.05
Dashboard /wp-admin2,196 ▲155.61 ▼0.1186.71 ▼21.1138.02 ▼4.27
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0638.25 ▼2.4737.26 ▼0.62
Add New Post /wp-admin/post-new.php1,529 ▲323.34 ▲0.07606.69 ▼95.7549.94 ▲2.43
Media Library /wp-admin/upload.php1,407 ▲74.19 ▼0.0195.57 ▼5.1539.73 ▼5.30
Gratisfaction /wp-admin/options-general.php?page=grappsmav1,2108.64146.48101.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • grappsmav_register
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gratisfaction-social-contests-referral-loyalty-rewards-program-by-appsmav/grappsmav.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gratisfaction-social-contests-referral-loyalty-rewards-program-by-appsmav/templates/settings.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=grappsmav
    • > Other (warning) in unknown
    https://cdn.livechatinc.com/widget/static/js/iframe.4fe2f6d5.chunk.js 1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
    • > GET request to /wp-admin/options-general.php?page=grappsmav
    • > Other (warning) in unknown
    http://cdn.livechatinc.com/tracking.js 0 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (The screenshot description corresponds to screenshot-1.(png|jpg|jpeg|gif).) image missing
The official readme.txt might help

gratisfaction-social-contests-referral-loyalty-rewards-program-by-appsmav/grappsmav.php 92% from 13 tests

The main PHP file in "Gratisfaction- Contests Giveaways Referral Loyalty Rewards and Birthdays Program" ver. 3.4.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("gratisfaction-social-contests-referral-loyalty-rewards-program-by-appsmav.php" instead of "grappsmav.php")

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
Success! There were no dangerous files found in this plugin2,226 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32802701,116
PHP417676876
SVG100228
CSS3146

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity59.00
▷ Minimum class complexity27.00
▷ Maximum class complexity91.00
Average method complexity4.87
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods30
▷ Static methods516.67%
▷ Public methods2790.00%
▷ Protected methods26.67%
▷ Private methods13.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/tick-green.png1.11KB0.35KB▼ 68.64%
img/tick-black.png1.02KB0.26KB▼ 74.42%
img/icon-link.png1.26KB0.35KB▼ 71.95%
img/appsmav-logo.png5.23KB2.71KB▼ 48.20%
img/icon-error.png1.36KB0.78KB▼ 43.12%