Plugin Directory

Changeset 2918208


Ignore:
Timestamp:
05/28/2023 11:16:05 AM (3 years ago)
Author:
zuda
Message:

creates unique urls automatically to enhance your SEO

Location:
redirect-editor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • redirect-editor/trunk/readme.txt

    r2918170 r2918208  
    33website link: https://planetzuda.com
    44security-flaw:security@planetzuda.com
    5 Tags:  redirect,  SEO, redirect editor, htaccess, 301 redirect, xml sitemap, sitemap 
     5Tags: SEO, redirect editor,  xml sitemap, content analysis 
    66Requires at least: 3.0
    77Tested up to: 6.2.2
     
    1414
    1515== Description ==
    16 Enhance Your Website's Search Engine Optimization with Our Powerful Features
    17 
    18 Unlock the true potential of your website's search engine optimization with our comprehensive suite of tools. We understand the importance of optimizing your online presence, and that's why we provide you with cutting-edge features designed to maximize your website's visibility and drive organic traffic. Allow us to introduce our XML sitemap and 301 redirect editor, two indispensable tools that will revolutionize your SEO strategy.
     16SEO done right is what we do. We provide SEO description, 301 redirects so people don't have to see 404's and we allow you to redirect the broken links to where you think they should go. This improves your SEO, bounce rate, and over all user experience with your site. Ever worried your url won't be unique or it'll be a bunch of numbers? Worry no more, we automatically generate unique urls as links for you when you type in your title.
     17
     18Unlock the true potential of your website's search engine optimization with our comprehensive suite of tools. We understand the importance of optimizing your online presence, and that's why we provide you with cutting-edge features designed to maximize your website's visibility and drive organic traffic. Allow us to introduce our XML sitemap and 301 redirect editor,  two indispensable tools that will revolutionize your SEO strategy.
    1919
    2020Our XML sitemap, seamlessly integrated with WordPress, offers unparalleled accessibility and efficiency. By providing a structured map of your website's content to search engines, it ensures that your pages are promptly and accurately indexed. With this essential tool at your disposal, you can effortlessly improve your website's search engine rankings and attract a broader audience.
     
    2424But that's not all. Our redirect editor goes beyond simple plugin functionalities by offering a streamlined, intuitive interface. No more grappling with complicated plugins for managing redirects on your website. Our editor empowers you with a straightforward textarea, allowing you to effortlessly edit and manage your 301 redirects. Each redirect is entered on a separate line, ensuring ease of use and clarity. In addition, our editor supports comments and automatically applies robust WordPress security measures, granting you peace of mind.
    2525
    26 
     26SEO descriptions is another powerful tool that shows users and search engines what your site is about. This is extremely powerful and is a valuable piece of real estate on websites that so many misuse and overlook, which makes them potentially miss out on new clients, because they don't understand how they should look to viewers or to search engines for search engine optimization.
    2727
    2828
     
    5656It adds in some protection from certain SEO software that has flaws which we patched.
    5757== Screenshots ==
     58== 3.1.1 ==
     59Now automatically creates unique, seo friendly urls based off the title of the page
    5860== 3.1 ==
    5961you can now add seo descriptions to posts and pages and you don't need to hit any extra buttons to save your seo description. When you save draft or hit publish the seo description is also published!
  • redirect-editor/trunk/redirect-editor.php

    r2918170 r2918208  
    33/*
    44Plugin Name: SEO & Redirect Editor
    5 Version: 3.1
     5Version: 3.1.1
    66Plugin URI: https://planetzuda.com
    7 Description: If you need to add seo description to your sites posts or pages so it can be seen easier by search engines, like Google or if you need to 301 redirect a broken link to a new page   for search engine optimization purposes, decrease your bounce rate and make a better site expecrence, this is the app you need you can use our app to  redirect to any page.  We make it  easy to submit your xml map to search engines manually from our plugin.  We  patch flawed SEO plugins, automatically. More search features are coming. Our redirect editor is extremely useful and highly secure, which has been tested in bug bounties by white hat hackers, including our security and seo company. Additionally it has been enhanced yet again by the security company Planet Zuda in conjunction with AI.
     7Description: add seo description to your sites posts or pages so it can be seen easier by search engines, like Google or if you need to 301 redirect a broken link to a new page   for search engine optimization purposes, decrease your bounce rate and make a better site expecrence, this is the app you need you can use our app to  redirect to any page.  We make it  easy to submit your xml map to search engines manually from our plugin.  We  patch flawed SEO plugins, automatically. More search features are coming. Our redirect editor is extremely useful and highly secure, which has been tested in bug bounties by white hat hackers, including our security and seo company. Additionally it has been enhanced yet again by the security company Planet Zuda in conjunction with AI.
    88Author: Planet Zuda
    99Author URI: https://planetzuda.com
     
    9494    public function __construct()
    9595    {
     96            add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
     97        add_action( 'post_submitbox_misc_actions', array( $this, 'display_reading_ease_score' ) );
     98        add_action( 'save_post', array( $this, 'save_reading_ease_score' ) );
     99          add_filter( 'wp_unique_post_slug', array( $this, 'generate_seo_friendly_url' ), 10, 4 );
    96100       
     101   
    97102add_action('wp_head', array($this, 'add_custom_meta_tags'));
    98103        add_action('add_meta_boxes', array($this, 'add_seo_meta_box'));
     
    141146       
    142147    }
    143 
     148 public function generate_seo_friendly_url( $slug, $post_id, $post_status, $post_type ) {
     149        if ( in_array( $post_type, array( 'post', 'page' ) ) && preg_match( '/%([a-z\-_]+)%/', $slug ) ) {
     150            $post = get_post( $post_id );
     151            if ( $post ) {
     152                $slug = sanitize_title( $post->post_title );
     153            }
     154        }
     155        return $slug;
     156    }
    144157public function css_style()
    145158{
     
    350363}
    351364*/
     365    // Enqueue necessary scripts and styles
     366    public function enqueue_scripts() {
     367        wp_enqueue_script( 'flesch-reading-ease', plugin_dir_url( __FILE__ ) . 'flesch-reading-ease.js', array( 'jquery' ), '1.0.0', true );
     368    }
     369
     370    // Calculate the Flesch Reading Ease score
     371    public function calculate_reading_ease_score( $post_id ) {
     372        $post = get_post( $post_id );
     373        $content = $post->post_content;
     374        $word_count = str_word_count( strip_tags( $content ) );
     375        $sentence_count = preg_match_all( '/[^\s](\.|\?|\!)(?!\w)/', $content, $matches );
     376
     377        if ( $word_count > 0 && $sentence_count > 0 ) {
     378            $average_words_per_sentence = $word_count / $sentence_count;
     379            $average_syllables_per_word = $this->count_average_syllables_per_word( $content );
     380
     381            $reading_ease_score = 206.835 - ( 1.015 * $average_words_per_sentence ) - ( 84.6 * $average_syllables_per_word );
     382
     383            return round( $reading_ease_score );
     384        }
     385
     386        return 0;
     387    }
     388
     389    // Count the average number of syllables per word
     390    private function count_average_syllables_per_word( $content ) {
     391        $syllables = 0;
     392        $words = preg_split( '/\s+/', strip_tags( $content ) );
     393
     394        foreach ( $words as $word ) {
     395            $syllables += $this->count_syllables( $word );
     396        }
     397
     398        if ( count( $words ) > 0 ) {
     399            return $syllables / count( $words );
     400        }
     401
     402        return 0;
     403    }
     404
     405    // Count the number of syllables in a word
     406    private function count_syllables( $word ) {
     407        $word = strtolower( $word );
     408        $word = preg_replace( '/(?:[^laeiouy]es|ed|[^laeiouy]e)$/', '', $word );
     409        $word = preg_replace_callback( '/[aeiouy]{1,2}/', function ( $matches ) {
     410            return isset( $matches[0] ) ? 'x' : '';
     411        }, $word );
     412
     413        return strlen( $word );
     414    }
     415
     416    // Display the Flesch Reading Ease score on the post editor screen
     417    public function display_reading_ease_score() {
     418        $post_id = get_the_ID();
     419        $reading_ease_score = $this->calculate_reading_ease_score( $post_id );
     420
     421        ?>
     422        <div class="misc-pub-section misc-pub-reading-ease-score">
     423            <label for="reading-ease-score"><?php _e( 'Reading Ease Score:', 'flesch-reading-ease' ); ?></label>
     424            <span id="reading-ease-score"><?php echo esc_html( $reading_ease_score ); ?></span>
     425        </div>
     426        <?php
     427    }
     428
     429    // Save the Flesch Reading Ease score when the post is saved or updated
     430    public function save_reading_ease_score( $post_id ) {
     431        if ( isset( $_POST['post_type'] ) && in_array( $_POST['post_type'], array( 'post', 'page' ) ) ) {
     432            $reading_ease_score = $this->calculate_reading_ease_score( $post_id );
     433            update_post_meta( $post_id, '_reading_ease_score', $reading_ease_score );
     434        }
     435    }
     436
     437
     438
    352439
    353440    public function save_data()
     
    437524              }
    438525 
     526   
     527   
    439528
    440529     public function redirect($query)
     
    456545
    457546
     547
    458548?>
Note: See TracChangeset for help on using the changeset viewer.