first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
.wpa-test-msg{background: #d1ecf1 !important; border: 1px solid #bee5eb !important; border-radius: 5px !important;color: #0c5460 !important; font-size: 14px !important; padding:.75rem 1.25rem !important; font-family: Arial !important; margin-top:5px !important;}
span.wpa-button{ display: inline-block !important; padding-top: 5px !important; color: #fff !important;background-color: #6c757d !important;border-color: #6c757d !important; padding: 5px 10px !important; border-radius: 5px !important; margin-top:5px !important; cursor: pointer !important; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1,12 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
/* BB PRESS */
add_action( 'bbp_new_topic_pre_extras','wpa_bbp_extra_validation');
add_action( 'bbp_new_reply_pre_extras','wpa_bbp_extra_validation');
function wpa_bbp_extra_validation(){
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','bbpress', $_POST);
bbp_add_error( 'bbp_extra_email', __( $GLOBALS['wpa_error_message'], 'bbpress' ) );
}
}

View File

@@ -0,0 +1,9 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
function wpa_calderaforms_extra_validation( ) {
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','calderaforms', $_POST);
die($GLOBALS['wpa_error_message']);
}
};
add_action( 'caldera_forms_pre_load_processors', 'wpa_calderaforms_extra_validation', 10, 0 );

View File

@@ -0,0 +1,11 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_filter( 'wpcf7_validate', 'wpa_contactform7_extra_validation', 10, 2 );
function wpa_contactform7_extra_validation($result, $tags){
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','contactform7', $_POST);
$result->invalidate('', $GLOBALS['wpa_error_message']);
}
return $result;
}

View File

@@ -0,0 +1,16 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
foreach($_POST as $param => $value){
if(strpos($param, 'et_pb_contactform_submit') === 0){
$is_divi_form = 'true';
$divi_form_additional = str_replace('et_pb_contactform_submit', '', $param);
}
}
if(!empty($is_divi_form) && $is_divi_form == 'true'){
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','divi_form', $_POST);
echo "<div id='et_pb_contact_form{$divi_form_additional}'><p>".$GLOBALS['wpa_error_message']."</p><div></div></div>";
die();
}
}

View File

@@ -0,0 +1,11 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
function wpa_elementor_extra_validation( $record, $ajax_handler ) {
if (wpa_check_is_spam($_POST)){
$all_fields = $record->get( 'fields' );
$firstField = array_key_first($all_fields);
do_action('wpa_handle_spammers','elementor', $_POST);
$ajax_handler->add_error($all_fields[$firstField]['id'], $GLOBALS['wpa_error_message']);
}
};
add_action( 'elementor_pro/forms/validation', 'wpa_elementor_extra_validation', 10, 2 );

View File

@@ -0,0 +1,11 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
function wpa_fluent_form_extra_validation($insertData, $data, $form) {
if (wpa_check_is_spam($data)){
do_action('wpa_handle_spammers','fluent_forms', $data);
//die($GLOBALS['wpa_error_message']);
wp_send_json_error(['errors' => $GLOBALS['wpa_error_message']]);
wp_die();
}
};
add_action( 'fluentform_before_insert_submission', 'wpa_fluent_form_extra_validation', 10, 3 );

View File

@@ -0,0 +1,11 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_filter( 'frm_validate_entry', 'wpa_formidable_extra_validation', 10, 2 );
function wpa_formidable_extra_validation($errors, $values){
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','formidable', $_POST);
$errors['my_error'] = $GLOBALS['wpa_error_message'];
}
return $errors;
}

View File

@@ -0,0 +1,20 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_action( 'gform_validation', 'wpa_gravityforms_extra_validation');
function wpa_gravityforms_extra_validation($validation_result ){
if (wpa_check_is_spam($_POST)){
$form = $validation_result['form'];
do_action('wpa_handle_spammers','gravityforms', $_POST);
$validation_result['is_valid'] = false;
foreach( $form['fields'] as &$field ) {
if ( $field->id == '1' ) {
$field->failed_validation = true;
$field->validation_message = $GLOBALS['wpa_error_message'];
break;
}
}
$validation_result['form'] = $form;
}
return $validation_result;
}

View File

@@ -0,0 +1,13 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_filter('cred_form_validate','wpa_toolsetform_extra_validation',20,2);
function wpa_toolsetform_extra_validation($error_fields, $form_data)
{
list($fields,$errors)=$error_fields;
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','toolset_form', $_POST);
die($GLOBALS['wpa_error_message']);
}
return array($fields,$errors);
}

View File

@@ -0,0 +1,12 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
// WP Comments
add_filter( 'preprocess_comment', 'wpa_wpcomment_extra_validation' );
function wpa_wpcomment_extra_validation( $commentdata ) {
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','wpcomment', $_POST);
wp_die( __( $GLOBALS['wpa_error_message'] ) );
}
return $commentdata;
}

View File

@@ -0,0 +1,10 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_filter( 'wpforms_process_before', 'wpa_wpforms_extra_validation', 10, 2 );
function wpa_wpforms_extra_validation($entry, $form_data){
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','wpforms', $_POST);
wpforms()->process->errors[ $form_data['id'] ][ '0' ] = $GLOBALS['wpa_error_message'];
}
}

View File

@@ -0,0 +1,17 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_action( 'register_form', 'wpa_wpregistration_add_initiator_field' );
function wpa_wpregistration_add_initiator_field() {
echo '<input type="hidden" id="wpa_initiator" class="wpa_initiator" name="wpa_initiator" value="" />';
}
add_filter( 'registration_errors', 'wpa_wpregistration_extra_validation', 10, 3 );
function wpa_wpregistration_extra_validation( $errors, $sanitized_user_login, $user_email ) {
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','wpregistration', $_POST);
$errors->add( 'wpa_extra_email', __($GLOBALS['wpa_error_message']) );
}
return $errors;
}

View File

@@ -0,0 +1,75 @@
var wpa_field_name, wpa_unique_id, wpa_add_test, wpa_hidden_field;
jQuery(document).ready(function(){
wpa_field_name = wpa_field_info.wpa_field_name;
wpa_unique_id = wpa_field_info.wpa_field_value;
wpa_add_test = wpa_field_info.wpa_add_test;
wpa_hidden_field = "<span class='wpa_hidden_field' style='display:none;height:0;width:0;'><input type='text' name='"+wpa_field_name+"' value='"+wpa_unique_id+"' /></span>";
wpa_add_honeypot_field();
if (typeof wpae_add_honeypot_field == 'function') { // IF EXTENDED version exists.
wpae_add_honeypot_field();
}
if (wpa_add_test == 'yes'){
wpa_add_test_block();
}
});
function wpa_act_as_spam(){
actiontype = jQuery('span.wpa-button').data('actiontype');
if (actiontype == 'remove'){
wpa_remove_honeypot_field();
jQuery('span.wpa-button').data('actiontype','add');
jQuery('span.wpa-button').html('Acting as Spam Bot');
} else {
wpa_add_honeypot_field();
jQuery('span.wpa-button').data('actiontype','remove');
jQuery('span.wpa-button').html('Act as Spam Bot');
}
}
function wpa_add_honeypot_field(){
jQuery('.bbp-topic-form form').append(wpa_hidden_field); // BBPRESS TOPIC
jQuery('.bbp-reply-form form').append(wpa_hidden_field); // BBPRESS REPLY
jQuery('form#commentform').append(wpa_hidden_field); // WP COMMENT
jQuery('form#ast-commentform').append(wpa_hidden_field); // Astra Comment Form
jQuery('form.wpcf7-form').append(wpa_hidden_field); // CONTACT FORM 7
jQuery('form.wpforms-form').append(wpa_hidden_field); // WPFFORMS
jQuery('.gform_wrapper form').append(wpa_hidden_field); // GRAVITY FORMS
jQuery('.frm_forms form').append(wpa_hidden_field); // Formidible forms
jQuery('.caldera-grid form').append(wpa_hidden_field); // Caldera forms
jQuery('.wp-block-toolset-cred-form form').append(wpa_hidden_field); // Toolset Forms
jQuery('form.et_pb_contact_form').append(wpa_hidden_field); // Divi Form
jQuery('form.elementor-form').append(wpa_hidden_field); // FOR Elementor
jQuery('form.form-contribution').append(wpa_hidden_field); //WooCommerce Reviews Pro
// FOR FLUENT FORMS
jQuery('form.frm-fluent-form').append(wpa_hidden_field); // FOR Fluent Forms
jQuery('.ff_conv_app').append(wpa_hidden_field); // FOR Fluent Convertional Forms
if (typeof fluent_forms_global_var_1 !== 'undefined') { // QUICK HACK FOR FLUENT FORMS CONVERSIONAL
fluent_forms_global_var_1.extra_inputs[wpa_field_name] = wpa_unique_id;
}
// EOF FLUENT FORMS
jQuery(wpa_hidden_field).insertAfter('input.wpa_initiator'); // FOR WPA INITIATOR (WP registration)
}
function wpa_add_test_block(){
checkingTest = '<div class="wpa-test-msg"><strong>WP Armour ( Only visible to site administrators. Not visible to other users. )</strong><br />This form has a honeypot trap enabled. If you want to act as spam bot for testing purposes, please click the button below.<br/><span class="wpa-button" onclick="wpa_act_as_spam()" data-actiontype="remove">Act as Spam Bot</span></div>';
jQuery('.wpa-test-msg').remove(); // Clear First
jQuery('span.wpa_hidden_field').after(checkingTest);
}
function wpa_remove_honeypot_field(){
jQuery('.wpa_hidden_field').remove();
if (typeof fluent_forms_global_var_1 !== 'undefined') {
delete fluent_forms_global_var_1.extra_inputs[wpa_field_name];
}
}

View File

@@ -0,0 +1,46 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<style type="text/css">
.why_extended{padding: 10px; font-size: 14px;}
.why_extended ul li{ padding-bottom: 20px; width: 285px; float: left; margin:10px 20px 10px 0px;border: 1px solid #d0d0d0; background: #d8d8d8; height: 150px; border-radius: 5px; padding: 10px; line-height: 1.5;}
.why_extended ul label{display: block;padding-bottom: 10px; font-size: 15px; color: #000; font-weight: 500;}
</style>
<div class="why_extended">
<h3>Extra Tools that WP Armour Extended offers to make WP Armour more powerfull.</h3>
<ul>
<li><label>Additional Support</label>
* WooCommerce & Easy Digital Downloads <br/>
* QuForm, MC4WP, HTMLform plugin<br/>
* BuddyPress, BuddyBoss<br/>
* NinjaForms, S2 Member, Avia Enfold Theme<br/>
* Gravity Forms (For Ajax enabled and multi page form) and more..
</li>
<li><label>2 Level Spam Check</label>
Our lite version should block most of the spam bot submission. But if you are still getting spam submission, you can enable 2 level spam check in Extended version from Extended Settings tab.
</li>
<li><label>Record Spammer IP</label>
Record spammers' IPs to block them from future submissions.
</li>
<li><label>View Spam Submission</label>
See what data spam bot was trying to submit.
</li>
<li><label>Auto Block Spam Bot IP</label>
Allows you to block the spam bot IP so that they can't visit your website.
</li>
<li><label>Get HoneyPot Extended Now !</label>
Get WP Armour Extended and make WP Armour more powerful.
<br/>
<a href="https://dineshkarki.com.np/buy-wp-armour-extended" target="_blank" class="button" style="float: right;">GET IT NOW</a>
</li>
<li><label>Don't need WP Armour Extended Tools ?</label>
In the long run, spam bots learn how to bypass antispam systems. Staying on top of new methodologies is key. You can motivate us to continue development of the plugin by getting a license for the WP Armour Extended.
</li>
</ul>
</div>

View File

@@ -0,0 +1,44 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (isset($_POST['submit-wpa-general-settings'])){
$saveReturn = wpa_save_settings();
}
if (isset($_POST['submit-wpae-general-settings'])){
$saveReturn = wpae_save_settings();
}
if (isset($_GET['tab']) && array_key_exists($_GET['tab'],$wpa_tabs)){
$currentTab = $_GET['tab'];
} else {
$currentTab = 'settings';
}
?>
<?php if (isset($saveReturn)):?>
<div class="updated <?php echo $saveReturn['status']; ?>" id="message"><p><?php echo $saveReturn['body']; ?></p></div>
<?php endif; ?>
<div class="wrap">
<h1>WP Armour - HoneyPot Anti Spam</h1>
<nav class="nav-tab-wrapper">
<?php foreach ($wpa_tabs as $tabKey => $tabData) { ?>
<a href="?page=wp-armour&tab=<?php echo $tabKey; ?>" class="nav-tab <?php echo $currentTab == $tabKey?'nav-tab-active':''; ?>"><?php echo $tabData['name']; ?></a>
<?php } ?>
</nav>
<div class="tab-content">
<table width="100%">
<tr>
<td valign="top">
<?php include($wpa_tabs[$currentTab]['path']); ?>
</td>
<td width="15">&nbsp;</td>
<td width="250" valign="top"><?php include('wpa_sidebar.php'); ?></td>
</tr>
</table>
</div>
</div>

View File

@@ -0,0 +1,72 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_action('admin_notices', 'wpa_admin_notices');
if (isset($_GET['wpa_reviews_notice_hide']) == 1){
update_option('wpa_reviews_notice_hide','yes');
}
if (isset($_GET['wpa_extended_notice_hide']) == 1){
update_option('wpa_extended_notice_hide','yes');
}
function wpa_admin_notices(){
// FOR OLD EXTENDED VERSION
if(is_plugin_active( 'wp-armour-extended/wp-armour-extended.php' ) ) {
if ($GLOBALS['wpae_version'] < 1.17 ){
echo '<div class="notice notice-error is-dismissible">
<p><strong style="color:#900;">IMPORTANT : </strong> Your are using older version of WP Armour Extended. Please update to 1.17 or above for it to work properly.</p>
</div>';
}
}
// FOR REVIEWS
if (get_option('wpa_reviews_notice_hide') != 'yes'){
$installedDate = strtotime(get_option('wpa_installed_date'));
$todayDate = time();
$installedDays = round(($todayDate - $installedDate) / (60 * 60 * 24));
$wpa_stats = json_decode(get_option('wpa_stats'),true);
$all_spam_blocked = $wpa_stats['total']['all_time'];
if ($installedDays > 30 && $all_spam_blocked > 30){
echo '<div class="updated success" style="padding:10px; font-size:16px; line-height:1.6;color:#205225;">
Hey, WP Armour has blocked <strong>'.$all_spam_blocked.'</strong> spam submissions till date - thats awesome! Could you please do us a BIG favor and give it a 5-star rating on WordPress ? Just to help us spread the word and boost our motivation.<br/><br/>
<ul style="padding-left:50px;list-style-type: square;">
<li><a href="https://wordpress.org/support/plugin/honeypot/reviews/?filter=5" target="_blank">Ok, you deserve it</a></li>
<li><a href="https://dineshkarki.com.np/contact" target="_blank">I still have problem !!</a></li>
<li><a href="?wpa_reviews_notice_hide=1">I already did</a></li>
<li><a href="?wpa_reviews_notice_hide=1">Hide this message</a></li>
</ul>
</div>';
}
}
// UPSELLING EXTENDED VERSION
if (get_option('wpa_extended_notice_hide') != 'yes' && !is_plugin_active('wp-armour-extended/wp-armour-extended.php') ){
$installedDate = strtotime(get_option('wpa_installed_date'));
$todayDate = time();
$installedDays = round(($todayDate - $installedDate) / (60 * 60 * 24));
$wpa_stats = json_decode(get_option('wpa_stats'),true);
$all_spam_blocked = $wpa_stats['total']['all_time'];
if ($installedDays > 90 && $all_spam_blocked > 1000){
echo '<div class="updated success" style="padding:10px; font-size:16px; line-height:1.6;color:#205225;">
Hey, WP Armour has blocked <strong>'.$all_spam_blocked.'</strong> spam submissions till date - thats awesome!<br/><br/>
Can you help us by purchasing our Extended Version ? This will helps up maintain and support the plugin in upcoming days and make it even better. Our Extended version starts from 19.99 USD and comes with lifetime license (No monhtly or yearly recurring) and No API calls. <br/><br/>
Also, it has 2 level spam check and additionally works with WooCommerce, Ajax and Multi page Gravity Forms, Easy Digital Downloads, QuForm, MC4WP: Mailchimp for WordPress and have Spammer blocking based on IP, Record Spam Submission and so on.
<ul style="padding-left:50px;list-style-type: square;">
<li><a href="https://dineshkarki.com.np/buy-wp-armour-extended" target="_blank">I will help</a></li>
<li><a href="?wpa_extended_notice_hide=1">Hide this message</a></li>
</ul>
</div>';
}
}
}

View File

@@ -0,0 +1,67 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<br/>
<table class="wp-list-table widefat">
<thead>
<tr>
<th colspan="2"><strong>General Settings</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2"><strong>This plugin should work with default settings, however if you begin to get spam, update the field name below.</strong></td>
</tr>
<form method="post" action="">
<tr>
<td width="250">Honey Pot Field Name</td>
<td>
<input id="wpa_field_name" name="wpa_field_name" style="width:300px;" value="<?php echo esc_attr(get_option('wpa_field_name'));?>" type="text" readonly="readonly" />
<span class="dashicons dashicons-update" style="font-size: 28px; cursor: pointer;" onclick="wpa_unqiue_field_name()"></span>
<br/>
<em>Changing the field name regularly is a good idea. Please click on icon above to generate new field name.</em>
</td>
</tr>
<tr>
<td>Honey Pot Error Message</td>
<td>
<input name="wpa_error_message" style="width:300px;" value="<?php echo esc_attr(get_option('wpa_error_message'));?>" type="text" /><br/><em>Mesage for bots. No average human users will see though.</em>
</td>
</tr>
<tr>
<td>Disable Honeypot Test Widget</td>
<td>
<select name="wpa_disable_test_widget">
<option value="no" <?php echo get_option('wpa_disable_test_widget') == 'no'?'selected="selected"':''; ?> >No</option>
<option value="yes" <?php echo get_option('wpa_disable_test_widget') == 'yes'?'selected="selected"':''; ?> >Yes</option>
</select>
<em>Only visible when Admin user is logged in.</em>
</td>
</tr>
<tr>
<td colspan="2">
<?php wp_nonce_field( 'wpa_save_settings', 'wpa_nonce' ); ?>
<input type="submit" name="submit-wpa-general-settings" class="button-primary" value="Save General Settings" />
</td>
</tr>
</form>
</tbody>
</table><br/>
<script type="text/javascript">
function wpa_unqiue_field_name(){
var randomChars = 'abcdefghijklmnopqrstuvwxyz';
var length = 6;
var string = '';
for ( var i = 0; i < length; i++ ) {
string += randomChars.charAt(Math.floor(Math.random() * randomChars.length));
}
var number = Math.floor(1000 + Math.random() * 9000);
jQuery('#wpa_field_name').val(string+number);
}
</script>

View File

@@ -0,0 +1,49 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<style type="text/css">
ul.uaf_list{ list-style-type:square;margin-left: 2em;}
</style>
<br/>
<table class="wp-list-table widefat fixed bookmarks">
<thead>
<tr>
<th><strong>Quick Link</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul class="uaf_list">
<li><a href="https://wordpress.org/support/plugin/honeypot/" target="_blank">Support Forum</a></li>
<li><a href="https://www.facebook.com/Dnesscarkey-77553779916" target="_blank">Send Us Msg via Facebook</a></li>
<li><a href="https://dineshkarki.com.np/buy-wp-armour-extended" target="_blank">Get WP Armour Extended</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<br/>
<table class="wp-list-table widefat fixed bookmarks">
<thead>
<tr>
<th><strong>Plugins You May Like</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul class="uaf_list">
<li><a href="https://wordpress.org/plugins/use-any-font/" target="_blank">Use Any Font</a></li>
<li><a href="https://dineshkarki.com.np/jquery-validation-for-gravity-forms" target="_blank">Jquery Validation For Gravity Form</a></li>
<li><a href="http://wordpress.org/extend/plugins/any-mobile-theme-switcher/" target="_blank">Any Mobile Theme Switcher</a></li>
<li><a href="http://wordpress.org/extend/plugins/jquery-validation-for-contact-form-7/" target="_blank">Jquery Validation For Contact Form 7</a></li>
<li><a href="http://wordpress.org/extend/plugins/add-tags-and-category-to-page/" target="_blank">Add Tags And Category To Page</a></li>
<li><a href="http://wordpress.org/extend/plugins/block-specific-plugin-updates/" target="_blank">Block Specific Plugin Updates</a></li>
<li><a href="http://wordpress.org/extend/plugins/featured-image-in-rss-feed/" target="_blank">Featured Image In RSS Feed</a></li>
<li><a href="http://wordpress.org/extend/plugins/remove-admin-bar-for-client/" target="_blank">Remove Admin Bar</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<br/>

View File

@@ -0,0 +1,93 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$currentStats = json_decode(get_option('wpa_stats'), true);
?>
<br/>
<table class="wp-list-table widefat fixed bookmarks">
<?php
/*
<thead>
<tr>
<th colspan="5"><strong>Quick Stats</strong></th>
</tr>
</thead>
*/ ?>
<thead>
<tr>
<th><strong>Source</strong></th>
<th><strong>Today</strong></th>
<th><strong>This Week</strong></th>
<th><strong>This Month</strong></th>
<th><strong>All Time</strong></th>
</tr>
<thead>
<tbody>
<?php
if (!empty($currentStats)){
foreach ($currentStats as $source=>$statData): ?>
<tr>
<td><strong><?php echo ucfirst($source); ?></strong></td>
<td><?php echo @wpa_check_date($statData['today']['date'],'today')?$statData['today']['count']:'0'; ?></td>
<td><?php echo @wpa_check_date($statData['week']['date'],'week')?$statData['week']['count']:'0'; ?></td>
<td><?php echo @wpa_check_date($statData['month']['date'],'month')?$statData['month']['count']:'0'; ?></td>
<td><?php echo $statData['all_time']; ?></td>
</tr>
<?php endforeach;
} else { ?>
<tr><td colspan="5">No Record Found</td></tr>
<?php } ?>
</tbody>
</table><br/>
<br/>
<?php /*
<table class="wp-list-table widefat fixed bookmarks">
<thead>
<tr>
<th colspan="2"><strong>Visualization </strong></th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['bar']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Source', 'Today', 'This Week','This Month', 'All Time'],
<?php foreach ($currentStats as $source=>$statData): ?>
[
'<?php echo ucfirst($source); ?>',
<?php echo wpa_check_date($todayDate,'today')?$statData['today']['count']:'0'; ?>,
<?php echo wpa_check_date($weekDate,'week')?$statData['week']['count']:'0'; ?>,
<?php echo wpa_check_date($monthDate,'month')?$statData['month']['count']:'0'; ?>,
<?php echo $statData['all_time']; ?>
],
<?php endforeach;?>
]);
var options = {
chart: {
title: 'Spam blocked by WP Armour',
hAxis: {title: 'Source', titleTextStyle: {color: 'red'}},
},
colors:['#bedcf5','#75b5e9','#2c8ddd','#19609b']
};
var chart = new google.charts.Bar(document.getElementById('wpae_chart_div'));
chart.draw(data, google.charts.Bar.convertOptions(options));
}
</script>
<div id="wpae_chart_div" style="width:100%; height:400px; margin-top:15px; margin-bottom:10px;">
</div>
</td>
</tr>
</tbody>
</table><br/>*/ ?>

View File

@@ -0,0 +1,28 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<style type="text/css">
.wpa_stat_table{max-width: 100%;filter: blur(2px);-webkit-filter: blur(2px);}
.wpa_stat_table_holder{position: relative;}
.wpa_stat_overlay{position: absolute; z-index: 10; width: 80%; height: 80%;top: 10%; left: 10%;box-shadow: 0 0 25px 10px rgba(0,0,0,0.08); background: #fff; border-radius: 5px; text-align:center;}
.wpa_stat_overlay .wpa_stat_headline{font-size: 20px; margin-top: 20px; padding: 5px;}
.wpa_stat_overlay .wpa_stat_content{padding: 5px;}
.wpa_stat_button a{ padding: 5px 30px !important; }
</style>
<div class="wpa_stat_table_holder">
<img class="wpa_stat_table" src="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . 'img/dashboard_stats.png'; ?>" />
<div class="wpa_stat_overlay">
<div class="wpa_stat_headline">
View all spam statistics from dashboard
</div>
<div class="wpa_stat_content">
<p>Enable stats widgets with WP Armour Extended.</p>
<p>Also, it can auto block spammer's IP and record what spammer are trying to submit.</p>
</div>
<div class="wpa_stat_button">
<a href="https://dineshkarki.com.np/buy-wp-armour-extended" target="_blank" class="button button-primary">Get WP Armour Extended</a>
</div>
</div>
</div>

View File

@@ -0,0 +1,6 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$GLOBALS['wpa_version'] = '2.0.1';
$GLOBALS['wpa_field_name'] = get_option('wpa_field_name');
$GLOBALS['wpa_error_message'] = get_option('wpa_error_message');
$GLOBALS['wpa_disable_test_widget'] = get_option('wpa_disable_test_widget');

View File

@@ -0,0 +1,16 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_action("wp_dashboard_setup", "wpa_dashboard_widget");
function wpa_dashboard_widget()
{
add_meta_box( 'wpa_dashboard_widget', 'WP Armour Anti Spam Statistics', 'wpa_dashboard_widget_function', 'dashboard', 'side', 'high');
}
function wpa_dashboard_widget_function(){
ob_start();
include('views/wpa_stats_widget.php');
$widget_content = ob_get_contents();
ob_end_clean ();
$widget_content = apply_filters( 'wpa_widget_content', $widget_content);
echo $widget_content;
}

View File

@@ -0,0 +1,153 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
function wpa_load_scripts(){
wp_enqueue_script( 'wpascript', plugins_url( '/js/wpa.js', __FILE__ ), array ( 'jquery' ), $GLOBALS['wpa_version'], true);
wp_add_inline_script( 'wpascript', 'wpa_field_info = '.json_encode(wpa_field_info()));
wp_enqueue_style( 'wpa-css', plugins_url( '/css/wpa.css', __FILE__ ), array(), $GLOBALS['wpa_version']);
}
function wpa_plugin_menu(){
add_menu_page( 'WP Armour', 'WP Armour', 'manage_options', 'wp-armour', 'wpa_options','dashicons-shield');
}
function wpa_options(){
$wpa_tabs = array(
'settings' => array('name'=>'Settings','path'=>'wpa_settings.php'),
'stats' => array('name'=>'Statistics','path'=>'wpa_stats.php'),
'extended_version' => array('name'=>"What's in WP Armour Extended ?",'path'=>'wpa_extended_version.php')
);
$wpa_tabs = apply_filters( 'wpa_tabs_filter', $wpa_tabs);
include 'views/wpa_main.php';
}
function wpa_save_settings(){
if ( isset($_POST['wpa_nonce']) && wp_verify_nonce($_POST['wpa_nonce'], 'wpa_save_settings')) {
if (empty($_POST['wpa_field_name'])){
$return['status'] = 'error';
$return['body'] = "Honey Pot Field Name can't be empty";
} else {
update_option('wpa_field_name',sanitize_title_with_dashes($_POST['wpa_field_name']));
update_option('wpa_error_message',sanitize_text_field($_POST['wpa_error_message']));
update_option('wpa_disable_test_widget',sanitize_text_field($_POST['wpa_disable_test_widget']));
$GLOBALS['wpa_field_name'] = get_option('wpa_field_name');
$GLOBALS['wpa_error_message'] = get_option('wpa_error_message');
$return['status'] = 'ok';
$return['body'] = 'Settings Saved';
}
} else {
$return['status'] = 'error';
$return['body'] = 'Sorry, your nonce did not verify. Please try again.';
}
return $return;
}
function wpa_save_stats($wp_system, $data){
$currentStats = json_decode(get_option('wpa_stats'), true);
$timeArray = array('today','week','month');
if (!array_key_exists($wp_system,$currentStats)){
$currentStats[$wp_system]['today']['count'] = 0;
$currentStats[$wp_system]['week']['count'] = 0;
$currentStats[$wp_system]['month']['count'] = 0;
$currentStats[$wp_system]['today']['date'] = date('Ymd');
$currentStats[$wp_system]['week']['date'] = date('Ymd');
$currentStats[$wp_system]['month']['date'] = date('Ymd');
}
foreach ($timeArray as $key => $time) {
if (wpa_check_date($currentStats['total'][$time]['date'],$time)){
$currentStats['total'][$time]['count'] += 1;
} else {
$currentStats['total'][$time]['count'] = 1;
}
if (wpa_check_date($currentStats[$wp_system][$time]['date'],$time)){
$currentStats[$wp_system][$time]['count'] += 1;
} else {
$currentStats[$wp_system][$time]['count'] = 1;
}
$currentStats['total'][$time]['date'] = date('Ymd');
$currentStats[$wp_system][$time]['date'] = date('Ymd');
}
$currentStats['total']['all_time'] += 1;
@$currentStats[$wp_system]['all_time'] += 1;
update_option('wpa_stats', json_encode($currentStats));
}
function wpa_check_date($timestamp, $comparision){
switch ($comparision) {
case 'today':
if (date('Ymd') == $timestamp){
return true;
} else {
return false;
}
break;
case 'week':
$firstWeekDay = date("Ymd", strtotime('monday this week'));
$lastWeekDay = date("Ymd", strtotime('sunday this week'));
if($timestamp >= $firstWeekDay && $timestamp <= $lastWeekDay) {
return true;
} else {
return false;
}
break;
case 'month':
if(date('Ym',strtotime($timestamp)) == date('Ym')) {
return true;
} else {
return false;
}
break;
}
}
function wpa_unqiue_field_name(){
$permitted_chars = 'abcdefghijklmnopqrstuvwxyz';
return substr(str_shuffle($permitted_chars), 0, 6).rand(1,9999);
}
function wpa_unqiue_field_value(){
if (function_exists('wpae_unqiue_field_value')){ // IF EXTENDED VERSION AVAILABLE
return wpae_unqiue_field_value();
} else {
return rand(1111, 999999);
}
}
function wpa_check_is_spam($form_data){
if (isset($form_data[$GLOBALS['wpa_field_name']])){
if (function_exists('wpae_2level_spam_check')){
return wpae_2level_spam_check($form_data[$GLOBALS['wpa_field_name']]);
} else {
return false; // FALSE MEANS NOT SPAM
}
} else {
return true; // TRUE MEANS SPAM
}
}
function wpa_field_info(){
if (current_user_can('activate_plugins') && (get_option('wpa_disable_test_widget') != 'yes')){
$wpa_add_test = 'yes';
} else {
$wpa_add_test = 'no';
}
$return = array(
'wpa_field_name' => $GLOBALS['wpa_field_name'],
'wpa_field_value' => wpa_unqiue_field_value(),
'wpa_add_test' => $wpa_add_test
);
return $return;
}

View File

@@ -0,0 +1,245 @@
=== WP Armour - Honeypot Anti Spam ===
Contributors: dnesscarkey
Donate link: https://dineshkarki.com.np/wp-armour-anti-spam
Tags: anti spam, spam checker, spam filter, gravity forms, contact form 7
Requires at least: 3.0
Tested up to: 6.0
Stable tag: 2.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Anti spam filter that blocks spam bots including russian spam in Contact Form 7, Gravity Forms, Ninja Forms, Formidable Forms, Comments, Registration and more..
== Description ==
This plugins block spam submissions using honeypot anti spam technic. No Captcha or extra verification field hassle to the users. Only lets spam bots to suffer using our anti spam filter.
<strong>Automatic anti spam protection for following forms (Available in Free Version) . No setup required.</strong>
* WP Comments
* WP Registraton
* BBPress Forum (<a href="https://bbpress.org">bbpress.org</a>)
* Contact Form 7 (<a href="https://wordpress.org/plugins/contact-form-7">wordpress.org/plugins/contact-form-7</a>)
* Gravity Forms (For Non Ajax and Single Page/Step Form - <a href="https://www.gravityforms.com">gravityforms.com</a>)
* WPForms (<a href="https://wpforms.com">wpforms.com</a>)
* Formidable Forms (<a href="https://formidableforms.com">formidableforms.com</a>)
* Caldera Forms (<a href="https://calderaforms.com">calderaforms.com</a>)
* Toolset Forms (<a href="https://toolset.com">toolset.com</a>)
* Elementor Forms (<a href="https://elementor.com">elementor.com</a>)
* Fluent Forms (<a href="https://fluentforms.com">fluentforms.com</a>)
* Divi Theme Contact Form (<a href="https://www.elegantthemes.com">elegantthemes.com</a>)
* Theme My Login ( https://wordpress.org/plugins/theme-my-login/ )
* WooCommerce Reviews Pro
* GDPR compliant. No tracking, cookie storage or external server calls.
<strong>WP Armour Extended (Paid Version) supports additional anti spam protection and features.</strong>
* Added 2 level spam check. If you are still getting spam submission, you can enable 2 level spam check in Extended version from Extended Settings tab.
* WooCommerce Checkout & Registration (<a href="https://woocommerce.com">woocommerce.com</a>)
* Easy Digital Downloads Checkout and Registration (<a href="https://easydigitaldownloads.com">easydigitaldownloads.com</a>)
* QuForm Contact Form (<a href="https://www.quform.com">quform.com</a>)
* Ninja Forms (<a href="https://ninjaforms.com">https://ninjaforms.com</a>)
* Gravity Forms (For Ajax Based and Multi Step Forms - <a href="https://www.gravityforms.com">gravityforms.com</a>)
* MC4WP: Mailchimp for WordPress (<a href="https://www.mc4wp.com">mc4wp.com</a>)
* S2 Members (<a href="https://s2member.com">s2member.com</a>)
* HTMLform plugin (<a href="https://www.htmlformsplugin.com">htmlformsplugin.com</a>)
* Avia Enfold Theme (<a href="https://kriesi.at/themes/enfold">kriesi.at/themes/enfold</a>)
* BuddyPress (<a href="https://buddypress.org">buddypress.org</a>)
* BuddyBoss (<a href="https://www.buddyboss.com">buddyboss.com</a>)
* Logs spam bot IPs.
* Block spam bot IPs if multiple spam is submitted. Add extra level of anti spam filter based on IPs. Stops spam bot from using unwanted bandwidth and save valuable server resource.
* View what spam bot are trying to submit, so that you are sure our plugin is blocking legit spam bots.
You can get the WP Armour - Anti Spam Extended from <a title="WP Armour Extended - Anti Spam" href="https://dineshkarki.com.np/buy-wp-armour-extended">here</a>
<strong>How our plugin is different than other honeypot anti spam plugins ? </strong>
* Works for most of the forms and wordpress system including registation and comments. So All in one anti spam solution.
* No external API calls like Akismet or CleanTalk for spam filtering.
* GDPR Compliant.
* Spam bots can't use javascript so we use javascript to insert honeypot anti spam field in the form and spam bots can't fill it to pass anti spam test.
* Unique honeypot field name generated for each wordpress installation, so it is hard for spam bots to make one fit for all solution to bypass honeypot anti spam test.
* No setup required. Just activate the plugin and it enables anti spam for all supported forms, comment and registration.
* No API or monthly subscription needed like other plugins. Though we have <a title="WP Armour Extended - Anti Spam" href="https://dineshkarki.com.np/buy-wp-armour-extended">Premium extended version</a> of the plugin for more support with one time lifetime license.
<strong>Support</strong>
If you have any issue, you can write to using <a title="WP Armour - Honeypot Anti Spam Forum" href="https://wordpress.org/support/plugin/honeypot/" target="_blank">support forum.</a>
<strong>Want itegration for other plugins for anti spam support ? </strong>
You can fill this form and we will start working for it. <a href="https://forms.gle/VFhrQRtkjbwZ4Pbe9">https://forms.gle/VFhrQRtkjbwZ4Pbe9</a>
<strong>Our other plugins</strong>
* <a target="_blank" href="http://wordpress.org/plugins/use-any-font">Use Any Font</a>
* <a target="_blank" href="http://wordpress.org/plugins/any-mobile-theme-switcher/">Any Mobile Theme Switcher</a>
* <a target="_blank" href="http://wordpress.org/plugins/jquery-validation-for-contact-form-7/">Jquery Validation For Contact Form 7</a>
* <a target="_blank" href="https://dineshkarki.com.np/jquery-validation-for-gravity-forms">Jquery Validation For Gravity Forms</a>
* <a target="_blank" href="http://wordpress.org/plugins/add-tags-and-category-to-page/">Add Tags And Category To Page</a>
* <a target="_blank" href="http://wordpress.org/plugins/block-specific-plugin-updates/">Block Specific Plugin Updates</a>
* <a target="_blank" href="http://wordpress.org/plugins/featured-image-in-rss-feed/">Featured Image In RSS Feed</a>
== Installation ==
1. You can install plugin directly from Wordpress Plugin menu. Search for WP Armour - Honeypot Anti Spam plugin and click on Install OR you can download the plugin and install honeypot.zip from Upload Plugin button from Wordpress Plugin menu.
2. You can also access the settings from WP Armour menu. From there you can change honeypot anti spam field name and honeypot spam submission message.
3. Please check your forms, comments, bbpress, registration to confirm they are working after honeypot is placed. There will be widgets below the forms to confirm anti spam protection is enabled and ready to block spam.
== Frequently Asked Questions ==
= How this plugin is different than other honeypot anti spam plugins ? =
We have used the honeypot technic differently in this plugin to make it work better. What other plugin does is, they add honeypot anti spam field from server side (PHP) and check if the spam bot have filled or not. If it is filled it is marked as spam. But in our case, we add honeypot anti spam field from client side (Javascript) and check if honeypot field exists or not. Spam bots can't use javascript and honeypot field is not available for them. This way we can better trap spam bot.
= Will it block all the spam submission ? =
Spam submission are either created by spam bot or by manual submission from users. Honeypot trap is for spam bots only. So there won't be submission from spam bots. So you get rid of around 98% of spam. And ya, it can block russian spam, chinese spam effectively.
= Forms i am using is not supported. Can you help ? =
Ya, Please write to us using <a href="https://forms.gle/VFhrQRtkjbwZ4Pbe9">https://forms.gle/VFhrQRtkjbwZ4Pbe9</a> and we will try to add anti spam protection support to it.
= How can i verify that honeypot anti spam protection is enabled ? =
Honeypot Anti Spam is a trap for spam bots, so it is not visible for users. However, if you are logged in as Administrator, WP Armour Test widget is shown below the form. This will confirm Honeypot anti spam checker is active in that form. And also allows you to test it as spam bot.
= Do i need Captcha verification ? =
No, with this plugin you don't need Captcha, reCaptcha or Invisble Captcha at all. Lets avoid hassle for common users. Just activate the plugin and for all supported forms, anti spam filter is enabled automatically.
= I am already using reCaptcha but still getting spam. Can this plugin stop spammers ? =
Yes. Spam bots are now able to solve the captcha puzzle. So they are no longer effective as anti spam checker . Our plugin's javascript based anti spam filter can block them as spam bots can't use javascript.
= I see settings to change honeypot anti spam field name. Do i need to change it ? =
By default our plugin generates unqiue honeypot anti spam field name so that the slim chance of spam bots using the field to submit spam is more slimmer. This blocks them to create one for all type solution to bypass the honeypot field. But even in that case if you get spam bot submission, chaging the field name should work.
= Can i see what data spammers are trying to submit ? =
With WP Armour - Honeypot Anti Spam plugin it is No. But if you want you can use <a title="WP Armour Extended - Anti Spam" href="https://dineshkarki.com.np/buy-wp-armour-extended">WP Armour Extended</a> and can see what data spammers are trying to submit. It also have feature to block ip address if there are multiple submission from same IP and adds extra layer of spam protection.
== Screenshots ==
1. Screenshot #1. WP Armour - Honeypot Anti Spam Settings
1. Screenshot #2. WP Armour - Honeypot Anti Spam Statistics
1. Screenshot #3. Honeypot for Contact Form 7 ( anti spam for contact form 7 )
1. Screenshot #4. Honeypot for Formidable Forms ( anti spam for formidable forms)
1. Screenshot #5. Honeypot for Gravity Forms ( anti spam for gravity forms )
1. Screenshot #6. Honeypot for BBpress Wordpress Forum ( anti spam for bbpress forums )
1. Screenshot #7. Honeypot for Comment ( anti spam for comments )
1. Screenshot #8. Honeypot for WPForms ( anti spam for WPForms )
1. Screenshot #9. Honeypot for Caldera Forms ( anti spam for caldera forms)
1. Screenshot #10. Honeypot for Divi Contact Forms ( anti spam for Divi contact forms )
1. Screenshot #11. Anti Spam for WooCommerce Checkout (Available in Extended version)
1. Screenshot #11. Anti Spam for Fluent Forms
== Changelog ==
= = 2.0.1 =
* Fixed error message due to removal of ajax call.
= = 2.0 =
* Fixed false notification message regarding version conflict.
= = 1.10 =
* Fixed Popup Form issue
* Removed wpa_field_info Ajax call
= = 1.9.2 =
* Fixed Astra Theme Comment Issue
= = 1.9.1 =
* Removed alert msg error.
= = 1.9 =
* Removed inline javascript for better performance.
= = 1.8.5 =
* Added support for WooCommerce Reviews Pro.
* Added support for Fluent Form Conversional Forms.
= = 1.8.4 =
* removed complicated spam checker as it was creating issue for some users.
= = 1.8.3 =
* Fixed false spam issue for some users.
= = 1.8.2 =
* Added extra security check
= = 1.8.1 =
* Fixed session issue.
= = 1.8 =
* Added dynamic value for honeypot field test for more powerfull spam blocker.
= = 1.7.2 =
* Added random field name generate button
* Fixed stats issue.
= = 1.7.1 =
* Fixed Test Widget not showing issue
* Fixed stats issue.
= = 1.7 =
* Fixed Hide Notification issue.
* Tested with 5.7.
= = 1.6 =
* Removed WooCommerce Support from Lite version due to complications.
* Added option to disable Wp Armour Anti Spam Widget.
= = 1.5.9 =
* Removed WooCommerce checkout spam protection.
= = 1.5.8 =
* Fixed Extended verion save settings.
= = 1.5.7 =
* Fixed security issue.
= = 1.5.6 =
* Fixed Gravity Form Ajax Issue
* Added anti spam protection for Elementor Form Widget
* Added anti spam protection for Fluent Forms.
= = 1.5.5 =
* Added anti spam protection for woocommerce.
* Added anti spam protection for divi contact form.
= = 1.5.4 =
* Added anti spam statictic in Dashboard for Extended version users.
= = 1.5.3 =
* Added anti spam support for Toolset Forms.
* Fixed Caldera Forms anti spam message issue in Admin.
= = 1.5.2 =
* Removed anti spam filter from admin comment section. Before it was marking the comment as spam when trying to add from admin panel.
= = 1.5.1 =
* Added honeypot anti spam support for Caldera Forms.
= = 1.5 =
* WP Armour Test Panel added in forms to confirm spam protection is enabled. Only visible for Admin.
= = 1.4 =
* Added honeypot anti spam for Formidable Forms
* Added honeypot anti spam statistics
= = 1.3 =
* Rebranding to WP Armour - Honeypot Anti Spam Plugin.
= = 1.1 =
* Removed unwanted settings.
= = 1.0 =
* First Release
* Added anti spam honeypot for contact form 7
* Added anti spam honeypot for gravity forms

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View File

@@ -0,0 +1,48 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
/*
Plugin Name: WP Armour - Honeypot Anti Spam
Plugin URI: http://wordpress.org/plugins/honeypot/
Description: Add honeypot anti spam protection.
Author: Dnesscarkey
Version: 2.0.1
Author URI: https://dineshkarki.com.np/wp-armour-anti-spam
*/
include 'includes/wpa_config.php';
include 'includes/wpa_functions.php';
include 'includes/wpa_dashboard_widget.php';
include 'includes/views/wpa_notice.php';
add_action( 'init', function(){
if( !is_admin() ){ // ONLY BLOCK SPAM IF IT IS NOT ADMIN PANEL
include 'includes/integration/wpa_bbpress.php';
include 'includes/integration/wpa_wpcomment.php';
include 'includes/integration/wpa_wpregistration.php';
include 'includes/integration/wpa_contactform7.php';
include 'includes/integration/wpa_wpforms.php';
include 'includes/integration/wpa_gravityforms.php';
include 'includes/integration/wpa_formidable.php';
include 'includes/integration/wpa_calderaforms.php';
include 'includes/integration/wpa_toolsetform.php';
include 'includes/integration/wpa_diviform.php';
}
include 'includes/integration/wpa_fluentform.php';
include 'includes/integration/wpa_elementor.php';
});
add_action('wp_enqueue_scripts','wpa_load_scripts');
add_action('login_enqueue_scripts','wpa_load_scripts');
add_action('admin_menu', 'wpa_plugin_menu');
add_action('wpa_handle_spammers','wpa_save_stats',10,2);
register_activation_hook( __FILE__, 'wpa_plugin_activation' );
function wpa_plugin_activation(){
add_option('wpa_installed_date',date('Ymd'));
add_option('wpa_field_name',wpa_unqiue_field_name());
add_option('wpa_error_message',' Spamming or your Javascript is disabled !!');
add_option('wpa_disable_test_widget','no');
add_option('wpa_stats','{"total":{"today":{"date":"'.date('Ymd').'","count":0},"week":{"date":"'.date('Ymd').'","count":0},"month":{"date":"'.date('Ymd').'","count":0},"all_time":0}}');
}