Skip to content
View gupta-8's full-sized avatar

Sponsors

@vasugupt07676-creator

Block or report gupta-8

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
gupta-8/README.md

πŸ‘‹ Harsh Gupta

PHP & WordPress Developer β€’ Performance Enthusiast β€’ Code Craftsman

Follow Visitors

Make it work. Make it right. Make it fast. β€” Kent Beck


✨ About Me

<?php
class HarshGupta extends Developer {
    public function __construct() {
        $this->name       = "Harsh Gupta";
        $this->role       = "PHP & WordPress Developer";
        $this->location   = "Raipur, Chhattisgarh, India (UTC+5:30)";
        $this->philosophy = "Simple > Complex, Clarity > Cleverness";
    }

    public function dailyWorkflow(): array {
        return [
            'β˜• Coffee'   => 'Fuel for focus',
            'πŸ’» Code'     => 'Clean & scalable solutions',
            'πŸ› Debug'    => 'Fix with intent',
            '⚑ Optimize' => 'Performance as a feature',
            'πŸš€ Deploy'   => 'Ship with confidence'
        ];
    }

    public function currentFocus(): array {
        return [
            'Custom WordPress builds (themes/blocks/plugins)',
            'Core Web Vitals & TTFB optimization',
            'REST APIs & secure payment integrations',
            'Turning utilities into open plugins'
        ];
    }
}

🧰 Tech & Tools

Tech stack icons

  • WordPress (themes, plugins, Gutenberg blocks, ACF)
  • PHP 8+, Composer, PSR standards
  • Performance: caching (object/page), CDN, DB tuning
  • CI/CD, cPanel/CLI deploys, backups, logging, security hardening

🧱 What I Build

  • 🎨 Custom WordPress Development β€” theme/plugin from scratch, CPTs & taxonomies, clean admin UX
  • πŸ”Œ APIs & Integrations β€” RESTful APIs, webhooks, OAuth, payment gateways
  • ⚑ Performance Optimization β€” Core Web Vitals, TTFB, query tuning, caching, CDN
  • πŸš€ Deployment & Maintenance β€” CI/CD, monitoring, auto-backups, security

🧠 Code Philosophy

  • 🎯 Pragmatic β€” simplest solution that works
  • πŸ” Measured β€” profile first, optimize second
  • 🧹 Clean β€” code is read more than written
  • πŸ”’ Secure β€” defense-in-depth, least privilege
  • ⚑ Fast β€” performance as a product feature
πŸ“¦ PHP: Clean JSON Response
<?php
function respond_json($data, int $status = 200): void {
    http_response_code($status);
    header('Content-Type: application/json; charset=UTF-8');
    header('X-Content-Type-Options: nosniff');

    echo json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR);
    exit;
}

// Usage
respond_json([
    'success'   => true,
    'message'   => 'Hello, World!',
    'timestamp' => time()
]);
πŸ”Œ WordPress: Custom REST Endpoint
<?php
/**
 * Plugin Name: HG β€” Custom REST API
 * Description: Clean REST endpoint example
 * Author: Harsh Gupta
 */

add_action('rest_api_init', function () {
    register_rest_route('hg/v1', '/hello', [
        'methods'  => 'GET',
        'callback' => function (WP_REST_Request $request) {
            return new WP_REST_Response([
                'message'   => 'Hello from WordPress!',
                'version'   => '1.0',
                'timestamp' => current_time('mysql')
            ], 200);
        },
        'permission_callback' => '__return_true',
    ]);
});
⚑ WordPress: Query Optimization
<?php
/**
 * Optimized query for custom post type using object cache.
 */
function get_optimized_posts(string $post_type, int $limit = 10): array {
    $cache_key = "optimized_posts_{$post_type}_{$limit}";
    $posts = wp_cache_get($cache_key, 'custom_queries');

    if (false === $posts) {
        $posts = get_posts([
            'post_type'      => $post_type,
            'posts_per_page' => $limit,
            'fields'         => 'ids',
            'no_found_rows'  => true,
            'orderby'        => 'date',
            'order'          => 'DESC',
        ]);

        wp_cache_set($cache_key, $posts, 'custom_queries', HOUR_IN_SECONDS);
    }

    return $posts;
}

πŸ§ͺ Current Status

const harsh = {
  status: "actively_coding",
  currently: [
    "βœ… Shipping WP + PHP builds with custom blocks",
    "βœ… Optimizing TTFB & Core Web Vitals",
    "βœ… Building REST APIs with auth",
    "πŸ”„ Creating open-source WP utilities",
    "πŸ”„ Recording dev tips & tutorials"
  ],
  availability: "Open for freelance & collaborations",
  timezone: "IST (UTC+5:30)"
};

πŸ’– Support

Thanks to @vasugupt07676-creator for supporting my work! ✨


πŸ“« Let’s Connect

Email badge GitHub badge


πŸ˜„ Dev Joke (click)
Jokes card

Made with ❀️ + β˜•

Pinned Loading

  1. incredible-portfolio incredible-portfolio Public

    Personal portfolio to highlight my work and creativity.

    PHP 4