Skip to content

gupta-8/gupta-8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

Hi, I’m Harsh Gupta 👋

Developer • Builder • Learner
PHP & WordPress · REST APIs · Performance-Driven Web Solutions
Chhattisgarh, India · UTC+5:30

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 Stack & Tools


Core Skills: PHP · WordPress · HTML/CSS/JS · MySQL · Docker · Git

  • 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

WordPress & PHP

  • Custom themes & plugins
  • Advanced Custom Fields (ACF)
  • Gutenberg blocks & editor patterns

APIs & Integrations

  • RESTful API development
  • Payment gateways & Webhooks
  • OAuth / authentication flows

Performance & Optimization

  • Core Web Vitals tuning
  • Query & caching optimization
  • CDN setup & TTFB reduction

Featured Projects


🧠 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 ❤️ and ☕ by Harsh Gupta

About

My corner of chaos, creativity, and commits.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published