Skip to content

Commit c9a3146

Browse files
committed
Optimize frontend assets: remove unused files (~1.2MB), add JS minification, lazy loading, update docs. Version 1.3.3
1 parent d11c101 commit c9a3146

22 files changed

Lines changed: 381 additions & 1830 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
*.phar
66
.phpunit.cache
77
vendor
8-
lib/
8+
lib/
9+
assets/node_modules/

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,27 @@ Transform your standard WordPress installation into an excellent, optimized webs
3030
3. Activate through WordPress admin
3131
4. Configure settings in **WP Excellence Addon** menu
3232

33+
## 🛠️ Assets & Build Process
34+
35+
### Static Resources Structure
36+
- **CSS**: SCSS compilation with Gulp, minified output in `assets/css/min/`
37+
- **JS**: Uglified JavaScript in `assets/js/min/`
38+
- **Images**: Optimized WebP/SVG formats with lazy loading
39+
40+
### Development Setup
41+
```bash
42+
cd assets/
43+
npm install
44+
npm run build # Build for production
45+
npm run dev # Watch mode for development
46+
```
47+
48+
### Asset Loading
49+
- Main stylesheet: `wp-addon.min.css` (enqueued automatically)
50+
- TinyMCE plugins: Loaded conditionally based on settings
51+
- FontAwesome: CDN for editor, Unicode icons for frontend
52+
- Images: Lazy loading enabled by default
53+
3354
## ✅ Requirements
3455

3556
- WordPress 6.6+

assets/css/critical.css

Lines changed: 0 additions & 110 deletions
This file was deleted.

assets/css/font-awesome.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

assets/css/form.css

Lines changed: 0 additions & 89 deletions
This file was deleted.

assets/css/popup.css

Lines changed: 0 additions & 29 deletions
This file was deleted.

assets/css/tiny.scss

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,9 @@ $color: #008ee1;
2626

2727
&:before {
2828
width: 25px;
29-
content: "\f00c";
29+
content: "";
3030
display: inline-block;
31-
font: 14px/1 FontAwesome;
3231
font-size: inherit;
33-
text-rendering: auto;
34-
-webkit-font-smoothing: antialiased;
35-
-moz-osx-font-smoothing: grayscale;
3632
position: initial;
3733
margin-left: -20px;
3834
top: 6px;
@@ -42,14 +38,14 @@ $color: #008ee1;
4238

4339
.list-style-star li {
4440
&:before {
45-
content: "\f005";
41+
content: "";
4642
color: $color;
4743
}
4844
}
4945

5046
.list-style-check li {
5147
&:before {
52-
content: "\f00c";
48+
content: "";
5349
color: $color;
5450
}
5551
}

assets/css/wp-addon.scss

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

55
$color: #008ee1;
66

7+
img {
8+
loading: lazy;
9+
}
10+
711
.list {
812
li{
913
list-style: none;
1014
&:before {
1115
width: 25px;
12-
content: "\f00c";
16+
content: "";
1317
display: inline-block;
14-
font: 14px/1 FontAwesome;
1518
font-size: inherit;
16-
text-rendering: auto;
17-
-webkit-font-smoothing: antialiased;
18-
-moz-osx-font-smoothing: grayscale;
1919
position: initial;
2020
margin-left: -20px;
2121
top: 6px;
@@ -24,16 +24,14 @@ $color: #008ee1;
2424
}
2525
.list-style-star li {
2626
&:before {
27-
content: "\f005";
27+
content: "";
2828
color: $color;
29-
font: 14px/1 FontAwesome;
3029
}
3130
}
3231
.list-style-check li{
3332
&:before {
34-
content: "\f00c";
33+
content: "";
3534
color: $color;
36-
font: 14px/1 FontAwesome;
3735
}
3836
}
3937

0 commit comments

Comments
 (0)