-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
1602 lines (1479 loc) · 112 KB
/
index.php
File metadata and controls
1602 lines (1479 loc) · 112 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
require_once 'includes/functions.php';
// Initialize variables
$url = '';
$result = null;
$input_url = '';
// Start session at the beginning
session_start();
// Process form submission
if ($_SERVER["REQUEST_METHOD"] == "POST" && !empty($_POST["url"])) {
$input_url = trim($_POST["url"]);
$url = formatUrl($input_url);
$result = checkWordPressSite($url);
// Store the complete result in session
$_SESSION['wp_result'] = $result;
$_SESSION['wp_url'] = $url;
$_SESSION['input_url'] = $input_url;
// Redirect to prevent form resubmission
header("Location: " . strtok($_SERVER["REQUEST_URI"], '?'));
exit();
}
// Check for stored result
if (isset($_SESSION['wp_result'])) {
$result = $_SESSION['wp_result'];
$url = $_SESSION['wp_url'];
$input_url = $_SESSION['input_url'];
// Clear the session data
unset($_SESSION['wp_result']);
unset($_SESSION['wp_url']);
unset($_SESSION['input_url']);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WordPress Theme & Plugin Detector | Find Any WP Theme or Plugin Instantly</title>
<meta name="description" content="Free WordPress Theme and Plugin Detector - Instantly analyze and identify themes, plugins, and technologies used by any WordPress website. No registration required.">
<meta name="keywords" content="WordPress theme detector, WordPress plugin finder, what theme is this, WP theme identifier, detect WordPress plugins, free WordPress analyzer, website theme checker, WordPress site scanner">
<link rel="canonical" href="https://yeasin.me/wordpress-theme-plugin-detector">
<!-- Open Graph Meta Tags -->
<meta property="og:title" content="WordPress Theme & Plugin Detector | Find Any WP Theme or Plugin">
<meta property="og:description" content="Free tool to instantly identify WordPress themes, plugins, and technologies used by any website. No registration required.">
<meta property="og:url" content="https://yeasin.me/wordpress-theme-plugin-detector">
<meta property="og:type" content="website">
<meta property="og:image" content="https://yeasin.me/wp-content/uploads/2024/11/wp-detector-thumbnail.jpg">
<meta property="og:image:alt" content="WordPress Theme & Plugin Detector Tool">
<meta property="og:site_name" content="Yeasin Hossain">
<!-- Twitter Card Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@meetyeasin">
<meta name="twitter:title" content="WordPress Theme & Plugin Detector | Find Any WP Theme or Plugin">
<meta name="twitter:description" content="Free tool to instantly identify WordPress themes, plugins, and technologies used by any website. No registration required.">
<meta name="twitter:image" content="https://yeasin.me/wp-content/uploads/2024/11/wp-detector-thumbnail.jpg">
<meta name="twitter:image:alt" content="WordPress Theme & Plugin Detector Tool">
<!-- Additional Meta Tags -->
<meta name="author" content="Yeasin Hossain">
<meta name="robots" content="index, follow">
<meta name="language" content="English">
<!-- Favicon -->
<link rel="icon" href="https://yeasin.me/wp-content/uploads/2024/05/fav.webp" type="image/webp">
<link rel="apple-touch-icon" href="https://yeasin.me/wp-content/uploads/2024/05/fav.webp">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/all.min.js" integrity="sha512-GWzVrcGlo0TxTRvz9ttioyYJ+Wwk9Ck0G81D+eO63BaqHaJ3YZX9wuqjwgfcV/MrB2PhaVX9DkYVhbFpStnqpQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<!-- Structured Data (JSON-LD) -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "WordPress Theme & Plugin Detector",
"description": "A free online tool to instantly identify themes, plugins, and technologies used by any WordPress website.",
"applicationCategory": "WebApplication",
"operatingSystem": "All",
"url": "https://yeasin.me/wordpress-theme-plugin-detector",
"author": {
"@type": "Person",
"name": "Yeasin Hossain",
"url": "https://yeasin.me",
"sameAs": [
"https://twitter.com/meetyeasin",
"https://github.com/yeasinhossain"
]
},
"offers": {
"@type": "Offer",
"price": "0.00",
"priceCurrency": "USD"
},
"featureList": [
"WordPress Theme Detection",
"Plugin Identification",
"Real-time Analysis",
"No Registration Required"
],
"screenshot": "https://yeasin.me/wp-content/uploads/2024/11/wp-detector-thumbnail.jpg",
"browserRequirements": "Requires JavaScript. Works in all modern browsers."
}
</script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#4F46E5',
secondary: '#111827',
success: '#10B981',
warning: '#F59E0B',
danger: '#EF4444',
}
}
}
}
</script>
<script>
function handleSubmit(form) {
if (form.submitted) {
return false;
}
form.submitted = true;
// Add a small delay to allow the form to submit
setTimeout(function() {
form.submitted = false;
}, 1000);
return true;
}
// Reset form.submitted on page load
window.onload = function() {
document.getElementById('analyzeForm').submitted = false;
}
// Reset form.submitted when user changes the URL
document.getElementById('siteUrl').addEventListener('input', function() {
document.getElementById('analyzeForm').submitted = false;
});
</script>
<style type="text/tailwindcss">
@layer components {
.btn-primary {
@apply bg-primary text-white font-semibold py-3 px-6 rounded-lg hover:bg-indigo-600 transition duration-300 ease-in-out transform hover:-translate-y-1;
}
.input-primary {
@apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent outline-none transition duration-300;
}
.result-card {
@apply bg-white rounded-lg shadow-md p-6 mb-6;
}
.status-badge {
@apply px-3 py-1 rounded-full text-sm font-semibold;
}
.status-success {
@apply bg-green-100 text-green-800;
}
.status-warning {
@apply bg-yellow-100 text-yellow-800;
}
.status-danger {
@apply bg-red-100 text-red-800;
}
}
</style>
<style>
.loading-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.9);
z-index: 1000;
justify-content: center;
align-items: center;
flex-direction: column;
}
.spinner {
width: 50px;
height: 50px;
border: 5px solid #f3f3f3;
border-top: 5px solid #4F46E5;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body class="bg-gray-100 dark:bg-gray-900">
<header class="bg-white dark:bg-gray-900 border-b dark:border-gray-700 fixed w-full top-0 z-50">
<nav class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-2">
<a href="https://yeasin.me/wordpress-theme-plugin-detector/" class="flex items-center space-x-3 rtl:space-x-reverse">
<i class="fas fa-bolt text-primary text-2xl"></i>
<span class="self-center text-xl font-semibold whitespace-nowrap dark:text-white">WP Detector</span>
</a>
<div class="flex md:order-2 space-x-3 md:space-x-0 rtl:space-x-reverse">
<a href="https://yeasin.me/free-resources/" target="_blank" rel="noopener">
<button type="button" class="text-white bg-primary hover:bg-primary-600 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-4 py-2 text-center dark:bg-primary dark:hover:bg-primary-700 dark:focus:ring-primary-800">Free Resources</button>
</a>
<button id="mobile-menu-button" type="button" class="inline-flex items-center p-2 w-10 h-10 justify-center text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600" aria-controls="navbar-sticky" aria-expanded="false">
<span class="sr-only">Open main menu</span>
<i class="fas fa-bars w-5 h-5"></i>
</button>
</div>
<div id="mobile-menu" class="items-center justify-between hidden w-full md:flex md:w-auto md:order-1">
<ul class="flex flex-col p-4 md:p-0 mt-4 font-medium border border-gray-100 rounded-lg bg-gray-50 md:space-x-8 rtl:space-x-reverse md:flex-row md:mt-0 md:border-0 md:bg-white dark:bg-gray-900 dark:border-gray-700">
<li>
<a href="https://yeasin.me/wordpress-theme-plugin-detector/" class="block py-2 px-3 text-primary bg-transparent rounded md:p-0" aria-current="page">Detector</a>
</li>
<li>
<a href="https://yeasin.me/top-wordpress-themes/" class="block py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:hover:text-primary md:p-0 md:dark:hover:text-primary dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700">Top Themes</a>
</li>
<li>
<a href="https://yeasin.me/top-wordpress-plugins/" class="block py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:hover:text-primary md:p-0 md:dark:hover:text-primary dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700">Top Plugins</a>
</li>
<li>
<a href="https://yeasin.me/top-wordpress-developers/" class="block py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:hover:text-primary md:p-0 md:dark:hover:text-primary dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700">Top Providers</a>
</li>
</ul>
</div>
</nav>
</header>
<div class="pt-20">
<!-- Loading Overlay -->
<div id="loadingOverlay" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50" style="display: none;">
<div class="bg-white p-6 rounded-lg shadow-xl flex items-center">
<div class="animate-spin rounded-full h-8 w-8 border-4 border-primary border-t-transparent mr-4"></div>
<div class="flex flex-col">
<p class="text-gray-700">Analyzing website...</p>
<p class="text-sm text-gray-500">This may take a few moments</p>
</div>
</div>
</div>
<div class="container mx-auto px-4 py-8 max-w-6xl">
<!-- Header Section -->
<div class="text-center mb-10">
<a href="https://yeasin.me/wordpress-theme-plugin-detector/" class="inline-block transform hover:scale-105 transition-transform duration-300" title="WordPress Theme & Plugin Detector">
<i class="fab fa-wordpress text-primary text-7xl mb-2 animate-pulse"></i>
</a>
<?php if (!isset($result)): ?>
<h1 class="text-4xl md:text-5xl font-bold text-gray-900 mb-6 leading-tight">
<span class="block">Detect WordPress Themes</span>
<span class="block">or Detect WordPress Plugins</span>
<span class="text-primary">100% Free & Accurate!</span>
</h1>
<div class="max-w-4xl mx-auto space-y-4">
<h2 class="text-gray-600 text-xl max-w-4xl mx-auto leading-relaxed">
Have you ever encountered a captivating WordPress website and wondered about the theme and plugins powering its design and functionality? You're not alone. Many seek to uncover the tools behind impressive sites. Our <strong class="text-primary">Instant WordPress Theme & Plugin Detector</strong> simplifies this process, providing detailed insights into the themes and plugins used by any WordPress site. Discover the building blocks of your favorite websites effortlessly.
</h2>
</div>
<?php endif; ?>
<?php if (isset($result)): ?>
<?php if (isset($result['isWordPress']) && $result['isWordPress']): ?>
<div class="space-y-4">
<h2 class="text-4xl md:text-5xl font-bold text-gray-900 mb-4 leading-tight">
<i class="fas fa-check-circle text-green-500 mr-2"></i>
WordPress Site Detected!
</h2>
<p class="text-xl font-medium text-gray-600">
We've found WordPress! Check out the detailed analysis below or analyze another website.
</p>
</div>
<?php else: ?>
<div class="space-y-4">
<h2 class="text-4xl md:text-5xl font-bold text-gray-900 mb-4 leading-tight">
<i class="fas fa-times-circle text-red-500 mr-2"></i>
Not a WordPress Site
</h2>
<p class="text-xl font-medium text-gray-600">
This website doesn't appear to be using WordPress. Try analyzing a different website!
</p>
<div class="mt-4 text-gray-500">
<p>Need help? <a href="https://yeasin.me/contact/" target="_blank" rel="noopener" class="text-primary hover:underline">Contact Support</a></p>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<!-- Main Form -->
<div class="bg-white rounded-2xl shadow-xl p-8 mb-8">
<form id="analyzeForm" method="post" class="flex flex-col md:flex-row items-center justify-center gap-4 py-6" onsubmit="return handleSubmit(this);">
<div class="flex-grow w-full md:max-w-3xl relative">
<i class="fas fa-link absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
<input type="text"
name="url"
id="siteUrl"
placeholder="Enter website URL..."
class="w-full px-6 py-4 pl-12 border-2 border-gray-200 rounded-xl text-lg focus:ring-2 focus:ring-primary focus:border-transparent transition-all duration-200 hover:border-primary"
required
value="<?php echo htmlspecialchars($input_url); ?>">
</div>
<button type="submit"
class="w-full md:w-auto bg-primary text-white px-8 py-4 rounded-xl hover:bg-primary-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary focus:ring-offset-2 whitespace-nowrap flex items-center justify-center text-lg font-semibold transition-all duration-200 hover:shadow-lg">
<i class="fas fa-search mr-3 text-xl"></i>
Analyze Website
</button>
</form>
<?php if (!isset($result)): ?>
<div class="flex items-center justify-center mt-4 gap-3 text-gray-600">
<i class="fas fa-lightbulb text-primary text-xl"></i>
<p class="text-lg font-medium">Discover the tools behind successful WordPress websites to optimize your own!</p>
</div>
<?php endif; ?>
<?php if (isset($result)): ?>
<!-- WordPress Detection Notice -->
<?php if (isset($result['isWordPress']) && $result['isWordPress']): ?>
<!-- 1. WordPress Information -->
<div class="mt-10 mb-16">
<h2 class="text-2xl font-bold mb-6 flex items-center">
<i class="fab fa-wordpress text-primary mr-3"></i>
WordPress Information
</h2>
<div class="bg-white shadow rounded-lg overflow-hidden mb-6">
<table class="min-w-full">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap bg-gray-50 text-sm font-medium text-gray-500"><i class="fab fa-wordpress text-primary mr-3"></i>WordPress Version</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
<?php echo !empty($result['version']) ? htmlspecialchars($result['version']) : 'Unknown/Hidden'; ?>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap bg-gray-50 text-sm font-medium text-gray-500"><i class="fas fa-paint-brush mr-2 text-primary"></i>Active Theme</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
<?php echo !empty($result['theme']) ? htmlspecialchars(basename($result['theme'])) : 'Unknown'; ?>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap bg-gray-50 text-sm font-medium text-gray-500"><i class="fas fa-plug mr-2 text-primary"></i>Active Plugins</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
<?php echo !empty($result['plugins']) ? count($result['plugins']) : '0'; ?> plugins detected
</td>
</tr>
</tbody>
</table>
</div>
<!-- Theme Information -->
<div class="mt-6 mb-10">
<h3 class="text-xl font-semibold mb-4"><i class="fas fa-paint-brush mr-2 text-primary"></i> Active Theme Details</h3>
<?php if (!empty($result['theme'])): ?>
<div class="result-card">
<?php
$themeInfo = getThemeInfo($url, $result['theme'] ?? '');
$wpThemeData = getWordPressOrgLinks($result['theme'] ?? '', 'theme');
?>
<div class="theme-info space-y-6">
<!-- Theme Details Table -->
<div class="overflow-x-auto shadow rounded-lg">
<table class="w-full theme-details">
<tbody class="divide-y divide-gray-200">
<!-- Theme Name -->
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50 w-1/4">Theme Name</td>
<td class="py-2 px-4">
<?php echo htmlspecialchars($themeInfo['Theme Name'] ?? ''); ?>
<?php if ($wpThemeData): ?>
<a href="<?php echo htmlspecialchars($wpThemeData['url']); ?>"
target="_blank"
class="ml-2 text-primary hover:underline">
<i class="fab fa-wordpress"></i>View on WordPress.org
</a>
<?php else: ?>
<span class="ml-2 text-sm text-gray-500">(Custom/Premium Theme)</span>
<?php endif; ?>
</td>
</tr>
<!-- Theme Version -->
<?php if (!empty($themeInfo['Version'])): ?>
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50">Version</td>
<td class="py-2 px-4"><?php echo htmlspecialchars($themeInfo['Version']); ?></td>
</tr>
<?php endif; ?>
<!-- Theme Author -->
<?php if (!empty($themeInfo['Author'])): ?>
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50">Author</td>
<td class="py-2 px-4">
<?php if (!empty($themeInfo['Author URI'])): ?>
<a href="<?php echo htmlspecialchars($themeInfo['Author URI']); ?>"
target="_blank"
class="text-primary hover:underline">
<?php echo htmlspecialchars($themeInfo['Author']); ?>
</a>
<?php else: ?>
<?php echo htmlspecialchars($themeInfo['Author']); ?>
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
<!-- Theme Description -->
<?php if (!empty($themeInfo['Description'])): ?>
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50">Description</td>
<td class="py-2 px-4"><?php echo htmlspecialchars($themeInfo['Description']); ?></td>
</tr>
<?php endif; ?>
<!-- Theme License -->
<?php if (!empty($themeInfo['License'])): ?>
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50">License</td>
<td class="py-2 px-4"><?php echo htmlspecialchars($themeInfo['License']); ?></td>
</tr>
<?php endif; ?>
<!-- Theme Screenshot -->
<?php if (!empty($themeInfo['Screenshot'])): ?>
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50">Theme Screenshot</td>
<td class="py-2 px-4">
<a href="<?php echo htmlspecialchars($themeInfo['Screenshot']); ?>" target="_blank" class="block">
<img style="width: 200px;"
src="<?php echo htmlspecialchars($themeInfo['Screenshot']); ?>"
alt="Theme Screenshot"
class="h-auto rounded-xl border border-gray-200 shadow-md hover:shadow-lg transition-all duration-300 transform hover:scale-105">
</a>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<!-- WordPress.org Theme Link -->
<?php if ($wpThemeData): ?>
<div class="p-4 bg-gray-50 shadow rounded-lg theme-item mb-6 hover:shadow-md transition-shadow duration-300">
<div class="mt-4">
<h4 class="text-lg font-semibold mb-2">
<a href="<?php echo htmlspecialchars($wpThemeData['url']); ?>"
target="_blank"
class="text-primary hover:underline flex items-center">
<?php echo htmlspecialchars(basename($result['theme'])) . '/' . htmlspecialchars($themeInfo['Theme Name']); ?>
<svg class="external-link ml-1" width="12" height="12" viewBox="0 0 24 24">
<path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2z"/>
<path fill="currentColor" d="M13 12l5.7-5.7-1.4-1.4 3.7-3.9 4 4-3.9 3.7-1.4-1.4-5.7 5.7z"/>
</svg>
</a>
</h4>
<?php if (!empty($themeInfo['Description'])): ?>
<p class="text-gray-600 mb-4"><?php echo htmlspecialchars($themeInfo['Description']); ?></p>
<?php endif; ?>
<div class="theme-meta flex flex-wrap items-center gap-4 text-sm text-gray-600 mb-4">
<?php if (!empty($themeInfo['Version'])): ?>
<span class="version flex items-center">
<i class="fas fa-code-branch mr-1"></i>v<?php echo htmlspecialchars($themeInfo['Version']); ?>
</span>
<?php endif; ?>
<?php if (!empty($wpThemeData['rating'])): ?>
<span class="rating flex items-center">
<i class="fas fa-star text-yellow-400 mr-1"></i><?php echo number_format($wpThemeData['rating'] / 20, 1); ?>/5
</span>
<?php endif; ?>
<?php if (!empty($wpThemeData['active_installs'])): ?>
<span class="installs flex items-center">
<i class="fas fa-download mr-1"></i><?php echo number_format($wpThemeData['active_installs']); ?>+ active installs
</span>
<?php endif; ?>
<?php if (!empty($wpThemeData['last_updated'])): ?>
<span class="updated flex items-center">
<i class="fas fa-clock mr-1"></i>Updated: <?php echo date('M j, Y', strtotime($wpThemeData['last_updated'])); ?>
</span>
<?php endif; ?>
</div>
<div class="flex space-x-3">
<a href="<?php echo htmlspecialchars($wpThemeData['url']); ?>"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fab fa-wordpress text-primary mr-2"></i> Download this Theme from WordPress.org
</a>
<?php if (!empty($wpThemeData['download_link'])): ?>
<a href="<?php echo htmlspecialchars($wpThemeData['download_link']); ?>"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fas fa-download mr-2"></i> Download this Theme
</a>
<?php endif; ?>
</div>
</div>
</div>
<?php endif; ?>
<!-- Non WordPress.org Theme Link -->
<?php if (!$wpThemeData): ?>
<div class="p-4 bg-gray-50 rounded-lg theme-item mb-6 hover:shadow-md transition-shadow duration-300">
<div class="mt-4">
<p class="text-gray-600 mb-4"><b><?php echo htmlspecialchars(basename($result['theme'])) . '/' . htmlspecialchars($themeInfo['Theme Name']); ?></b> not found on WordPress.org, this might be a custom or premium theme.</p>
<div class="flex space-x-3">
<!-- Search on Google button -->
<a href="https://www.google.com/search?q=<?php echo urlencode($themeInfo['Theme Name'] . ' wordpress theme'); ?>"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fab fa-google mr-2"></i> Search on Google
</a>
<!-- Search on WordPress.org button -->
<a href="https://wordpress.org/themes/search/<?php echo urlencode($themeInfo['Theme Name'] ?? ''); ?>/"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fab fa-wordpress mr-2"></i> Search on WordPress.org
</a>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if (!empty($themeInfo['Is Child Theme']) && !empty($themeInfo['Parent Theme Info'])): ?>
<div class="mb-4 p-4 bg-blue-50 border-l-4 border-blue-500 text-blue-700">
<div class="flex">
<div class="flex-shrink-0">
<i class="fas fa-info-circle"></i>
</div>
<div class="ml-3">
<p class="text-sm">This is a Child Theme based on the Parent Theme below</p>
</div>
</div>
</div>
<div class="mt-8">
<h3 class="text-xl font-semibold mb-4">
<i class="fas fa-code-branch mr-2 text-primary"></i> Parent Theme Details
</h3>
<div class="result-card">
<div class="theme-info space-y-6">
<!-- Parent Theme Details Table -->
<div class="overflow-x-auto shadow rounded-lg">
<table class="w-full theme-details">
<tbody class="divide-y divide-gray-200">
<!-- Parent Theme Name -->
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50 w-1/4">Theme Name</td>
<td class="py-2 px-4">
<?php
$parentThemeInfo = $themeInfo['Parent Theme Info'];
echo htmlspecialchars($parentThemeInfo['Theme Name'] ?? '');
$parentWpThemeData = getWordPressOrgLinks($themeInfo['Parent Theme'], 'theme');
if ($parentWpThemeData):
?>
<a href="<?php echo htmlspecialchars($parentWpThemeData['url']); ?>"
target="_blank"
class="text-primary hover:underline">
<i class="fab fa-wordpress"></i>View on WordPress.org
</a>
<?php else: ?>
<span class="ml-2 text-sm text-gray-500">(Custom/Premium Theme)</span>
<?php endif; ?>
</td>
</tr>
<!-- Parent Theme Version -->
<?php if (!empty($parentThemeInfo['Version'])): ?>
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50">Version</td>
<td class="py-2 px-4"><?php echo htmlspecialchars($parentThemeInfo['Version']); ?></td>
</tr>
<?php endif; ?>
<!-- Parent Theme Author -->
<?php if (!empty($parentThemeInfo['Author'])): ?>
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50">Author</td>
<td class="py-2 px-4">
<?php if (!empty($parentThemeInfo['Author URI'])): ?>
<a href="<?php echo htmlspecialchars($parentThemeInfo['Author URI']); ?>"
target="_blank"
class="text-primary hover:underline">
<?php echo htmlspecialchars($parentThemeInfo['Author']); ?>
</a>
<?php else: ?>
<?php echo htmlspecialchars($parentThemeInfo['Author']); ?>
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
<!-- Parent Theme Description -->
<?php if (!empty($parentThemeInfo['Description'])): ?>
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50">Description</td>
<td class="py-2 px-4"><?php echo htmlspecialchars($parentThemeInfo['Description']); ?></td>
</tr>
<?php endif; ?>
<!-- Parent Theme License -->
<?php if (!empty($parentThemeInfo['License'])): ?>
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50">License</td>
<td class="py-2 px-4"><?php echo htmlspecialchars($parentThemeInfo['License']); ?></td>
</tr>
<?php endif; ?>
<!-- Parent Theme Screenshot -->
<?php if (!empty($parentThemeInfo['Screenshot'])): ?>
<tr>
<td class="py-2 px-4 font-medium text-gray-600 bg-gray-50">Theme Screenshot</td>
<td class="py-2 px-4">
<a href="<?php echo htmlspecialchars($parentThemeInfo['Screenshot']); ?>" target="_blank" class="block">
<img style="width: 200px;"
src="<?php echo htmlspecialchars($parentThemeInfo['Screenshot']); ?>"
alt="Parent Theme Screenshot"
class="h-auto rounded-xl border border-gray-200 shadow-md hover:shadow-lg transition-all duration-300 transform hover:scale-105">
</a>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<!-- WordPress.org Parent Theme Link -->
<?php if ($parentWpThemeData): ?>
<div class="p-4 bg-gray-50 shadow rounded-lg theme-item mb-6 hover:shadow-md transition-shadow duration-300">
<div class="mt-4">
<h4 class="text-lg font-semibold mb-2">
<a href="<?php echo htmlspecialchars($parentWpThemeData['url']); ?>"
target="_blank"
class="text-primary hover:underline flex items-center">
<?php echo htmlspecialchars($themeInfo['Parent Theme']) . '/' . htmlspecialchars($parentThemeInfo['Theme Name']); ?>
<svg class="external-link ml-1" width="12" height="12" viewBox="0 0 24 24">
<path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2z"/>
<path fill="currentColor" d="M13 12l5.7-5.7-1.4-1.4 3.7-3.9 4 4-3.9 3.7-1.4-1.4-5.7 5.7z"/>
</svg>
</a>
</h4>
<?php if (!empty($parentThemeInfo['Description'])): ?>
<p class="text-gray-600 mb-4"><?php echo htmlspecialchars($parentThemeInfo['Description']); ?></p>
<?php endif; ?>
<div class="theme-meta flex flex-wrap items-center gap-4 text-sm text-gray-600 mb-4">
<?php if (!empty($parentThemeInfo['Version'])): ?>
<span class="version flex items-center">
<i class="fas fa-code-branch mr-1"></i>v<?php echo htmlspecialchars($parentThemeInfo['Version']); ?>
</span>
<?php endif; ?>
<?php if (!empty($parentWpThemeData['rating'])): ?>
<span class="rating flex items-center">
<i class="fas fa-star text-yellow-400 mr-1"></i><?php echo number_format($parentWpThemeData['rating'] / 20, 1); ?>/5
</span>
<?php endif; ?>
<?php if (!empty($parentWpThemeData['active_installs'])): ?>
<span class="installs flex items-center">
<i class="fas fa-download mr-1"></i><?php echo number_format($parentWpThemeData['active_installs']); ?>+ active installs
</span>
<?php endif; ?>
<?php if (!empty($parentWpThemeData['last_updated'])): ?>
<span class="updated flex items-center">
<i class="fas fa-clock mr-1"></i>Updated: <?php echo date('M j, Y', strtotime($parentWpThemeData['last_updated'])); ?>
</span>
<?php endif; ?>
</div>
<div class="flex space-x-3">
<a href="<?php echo htmlspecialchars($parentWpThemeData['url']); ?>"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fab fa-wordpress mr-2"></i> View Parent Theme on WordPress.org
</a>
<a href="https://downloads.wordpress.org/theme/<?php echo urlencode($themeInfo['Parent Theme']); ?>.zip"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fas fa-download mr-2"></i> Download Latest Version
</a>
</div>
</div>
</div>
<?php endif; ?>
<!-- Non WordPress.org Parent Theme Link -->
<?php if (!$parentWpThemeData): ?>
<div class="p-4 bg-gray-50 rounded-lg theme-item mb-6 hover:shadow-md transition-shadow duration-300">
<div class="mt-4">
<p class="text-gray-600 mb-4"><b><?php echo htmlspecialchars($themeInfo['Parent Theme']) . '/' . htmlspecialchars($parentThemeInfo['Theme Name']); ?></b> not found on WordPress.org, this might be a custom or premium theme.</p>
<div class="flex space-x-3">
<!-- Search on Google button -->
<a href="https://www.google.com/search?q=<?php echo urlencode($parentThemeInfo['Theme Name'] . ' wordpress theme'); ?>"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fab fa-google mr-2"></i> Search on Google
</a>
<!-- Search on WordPress.org button -->
<a href="https://wordpress.org/themes/search/<?php echo urlencode($parentThemeInfo['Theme Name'] ?? ''); ?>/"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fab fa-wordpress mr-2"></i> Search on WordPress.org
</a>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endif; ?>
</div>
<!-- Plugin Information -->
<div class="mt-6">
<h3 class="text-xl font-semibold mb-4"><i class="fas fa-puzzle-piece mr-2 text-primary"></i> Active Plugins Details</h3>
<?php if (!empty($result['plugins'])): ?>
<div class="plugins-grid grid gap-6">
<?php $index = 1; foreach ($result['plugins'] as $plugin): ?>
<?php $pluginInfo = getPluginInfo($plugin); ?>
<?php $pluginSlug = basename($plugin); ?>
<div class="p-4 bg-gray-50 shadow rounded-lg plugin-item hover:shadow-md transition-shadow duration-300 relative">
<!-- Plugin Number Badge -->
<div class="absolute -top-2 -left-3 w-8 h-8 bg-gray-500 text-white rounded-full flex items-center justify-center shadow-md z-10 text-sm font-semibold">
<?php echo $index++; ?>
</div>
<div class="flex flex-col pt-2">
<!-- Plugin Name and WordPress.org Link or Custom Label -->
<?php if (!empty($pluginInfo)): ?>
<h4 class="text-lg font-semibold mb-2 flex items-center">
<a href="https://wordpress.org/plugins/<?php echo urlencode($pluginSlug); ?>/"
target="_blank"
class="text-primary hover:underline flex items-center">
<?php echo htmlspecialchars($pluginInfo['name'] ?: $plugin); ?>
<svg class="external-link ml-1" width="12" height="12" viewBox="0 0 24 24">
<path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2z"/>
<path fill="currentColor" d="M13 12l5.7-5.7-1.4-1.4 3.7-3.9 4 4-3.9 3.7-1.4-1.4-5.7 5.7z"/>
</svg>
</a>
</h4>
<!-- Plugin Meta Information -->
<div class="plugin-meta flex flex-wrap items-center gap-4 text-sm text-gray-600 mb-4">
<?php if (!empty($pluginInfo['version'])): ?>
<span class="version flex items-center">
<i class="fas fa-code-branch mr-1"></i>v<?php echo htmlspecialchars($pluginInfo['version']); ?>
</span>
<?php endif; ?>
<?php if (!empty($pluginInfo['rating'])): ?>
<span class="rating flex items-center">
<i class="fas fa-star text-yellow-400 mr-1"></i><?php echo number_format($pluginInfo['rating'] / 20, 1); ?>/5
</span>
<?php endif; ?>
<?php if (!empty($pluginInfo['active_installs'])): ?>
<span class="installs flex items-center">
<i class="fas fa-download mr-1"></i><?php echo number_format($pluginInfo['active_installs']); ?>+ active installs
</span>
<?php endif; ?>
<?php if (!empty($pluginInfo['last_updated'])): ?>
<span class="updated flex items-center">
<i class="fas fa-clock mr-1"></i>Updated: <?php echo date('M j, Y', strtotime($pluginInfo['last_updated'])); ?>
</span>
<?php endif; ?>
</div>
<!-- Plugin Description -->
<?php if (!empty($pluginInfo['description'])): ?>
<p class="text-gray-600 mb-4"><?php echo htmlspecialchars($pluginInfo['description']); ?></p>
<?php endif; ?>
<!-- Plugin Download/View Buttons -->
<div class="flex space-x-3">
<a href="https://wordpress.org/plugins/<?php echo urlencode($pluginSlug); ?>/"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fab fa-wordpress mr-2"></i> View on WordPress.org
</a>
<a href="https://downloads.wordpress.org/plugin/<?php echo urlencode($pluginSlug); ?>.zip"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fas fa-download mr-2"></i> Download Latest Version
</a>
</div>
<?php else: ?>
<!-- Unknown/Custom Plugin Display -->
<h4 class="text-lg font-semibold mb-2 flex items-center">
<?php echo htmlspecialchars($pluginSlug); ?>
<span class="ml-2 text-sm text-gray-500">(Custom/Premium Plugin)</span>
</h4>
<!-- Search buttons for unknown plugins -->
<div class="flex space-x-3 mt-4">
<a href="https://www.google.com/search?q=<?php echo urlencode($pluginSlug . ' wordpress plugin'); ?>"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fab fa-google mr-2"></i> Search on Google
</a>
<a href="https://wordpress.org/plugins/search/<?php echo urlencode($pluginSlug); ?>/"
target="_blank"
rel="noopener"
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
<i class="fab fa-wordpress mr-2"></i> Search on WordPress.org
</a>
</div>
<?php endif; ?>
</div>
</div>
<?php endforeach; ?>
</div>
<?php else: ?>
<div class="bg-gray-50 rounded-lg p-4">
<p class="text-gray-600">No active plugins detected.</p>
</div>
<?php endif; ?>
</div>
<!-- 2. Security Analysis -->
<div class="mt-8 mb-16">
<h2 class="text-2xl font-bold mb-6 flex items-center">
<i class="fas fa-shield-virus text-primary mr-3"></i>
Security Analysis
</h2>
<?php if (isset($result['security'])): ?>
<div class="bg-white shadow rounded-lg overflow-hidden">
<table class="min-w-full">
<tbody class="divide-y divide-gray-200">
<?php foreach ($result['security'] as $key => $value): ?>
<?php
// Reverse the logic - if something is exposed/accessible, it's vulnerable
$isSecure = !$value;
$statusClass = $isSecure ? 'text-green-700 bg-green-50' : 'text-red-700 bg-red-50';
$icon = $isSecure ? 'fa-check-circle' : 'fa-times-circle';
$status = $isSecure ? 'Secure' : 'Vulnerable';
// Better labels for security checks
$labels = [
'version_exposed' => 'WordPress Version Exposure',
'readme_exposed' => 'readme.html File Access',
'directory_listing' => 'Directory Listing',
'debug_log_accessible' => 'Debug.log Access'
];
$label = $labels[$key] ?? ucwords(str_replace('_', ' ', $key));
?>
<tr>
<td class="px-6 py-4 whitespace-nowrap bg-gray-50 text-sm font-medium text-gray-600 w-1/3"><?php echo $label; ?></td>
<td class="px-6 py-4 whitespace-nowrap text-sm">
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium <?php echo $statusClass; ?>">
<i class="fas <?php echo $icon; ?> mr-2"></i>
<?php echo $status; ?>
</span>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<!-- Security Recommendations -->
<?php if (isset($result['security'])): ?>
<div class="mt-6">
<h3 class="text-lg font-semibold mb-4 flex items-center">
<i class="fas fa-lightbulb text-yellow-500 mr-2"></i>
Security Recommendations
</h3>
<div class="bg-blue-50 border-l-4 border-blue-400 p-4 rounded">
<ul class="space-y-3">
<?php
$recommendations = [];
if ($result['security']['version_exposed']) {
$recommendations[] = [
'icon' => 'fa-code-branch',
'text' => 'Remove WordPress version exposure by adding the following to your theme\'s functions.php:<br>
<code class="bg-blue-100 px-2 py-1 rounded">remove_action(\'wp_head\', \'wp_generator\');</code>'
];
}
if ($result['security']['readme_exposed']) {
$recommendations[] = [
'icon' => 'fa-file-alt',
'text' => 'Delete or restrict access to readme.html file in your WordPress root directory'
];
}
if ($result['security']['directory_listing']) {
$recommendations[] = [
'icon' => 'fa-folder',
'text' => 'Disable directory listing by adding this line to your .htaccess file:<br>
<code class="bg-blue-100 px-2 py-1 rounded">Options -Indexes</code>'
];
}
if ($result['security']['debug_log_accessible']) {
$recommendations[] = [
'icon' => 'fa-file-code',
'text' => 'Protect or disable the debug.log file:<br>
1. Add to wp-config.php: <code class="bg-blue-100 px-2 py-1 rounded">define(\'WP_DEBUG_LOG\', false);</code><br>
2. Or restrict access via .htaccess'
];
}
// If all checks pass
if (empty($recommendations)) {
echo '<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
<span>Great job! Your site passes all basic security checks. Continue monitoring and maintaining good security practices.</span>
</li>';
} else {
foreach ($recommendations as $rec) {
echo '<li class="flex items-start">
<i class="fas ' . $rec['icon'] . ' text-blue-500 mt-1 mr-3"></i>
<span>' . $rec['text'] . '</span>
</li>';
}
}
?>
</ul>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<!-- 3. Performance Metrics -->
<div class="mt-8">
<h2 class="text-2xl font-bold mb-6 flex items-center">
<i class="fas fa-tachometer-alt text-primary mr-3"></i>
Performance Metrics
</h2>
<?php if (isset($result['performance'])): ?>
<div class="bg-white shadow rounded-lg overflow-hidden">
<div class="p-6">
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- Load Time Section -->
<div class="bg-white rounded-xl p-6 shadow-md hover:shadow-lg transition-all duration-300 border border-gray-100 relative overflow-hidden group">
<div class="flex items-start">
<div class="flex-shrink-0 w-10 h-10 bg-primary bg-opacity-10 rounded-full flex items-center justify-center mr-4">
<i class="fas fa-clock text-primary"></i>
</div>
<div class="flex-grow">
<p class="text-sm font-medium text-gray-600 mb-2">Load Time</p>
<p class="text-2xl font-bold text-primary mb-2">
<?php echo number_format($result['performance']['load_time'], 2); ?>
<span class="text-base font-normal text-gray-600">seconds</span>
</p>
<p class="text-xs text-gray-500 italic">Faster load times provide better user experience</p>
</div>