93% fastseen-lazyloading

Code Review | Image lazyloading by Fastseen

WordPress plugin Image lazyloading by Fastseen scored 93% from 54 tests.

About plugin

  • Plugin page: fastseen-lazyloading
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 5.8.1
  • First release: Jun 10, 2020
  • Latest release: Jun 12, 2020
  • Number of updates: 9
  • Update frequency: every 0.2 days
  • Top authors: dathoangnd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 198 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.62MB] [CPU: ▼161.07ms] Passed 4 tests

This is a short check of server-side resources used by Image lazyloading by Fastseen
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1440.04 ▲19.09
Dashboard /wp-admin3.08 ▲0.0346.38 ▲0.58
Posts /wp-admin/edit.php3.13 ▲0.0347.36 ▲0.98
Add New Post /wp-admin/post-new.php2.86 ▼2.5723.12 ▼641.76
Media Library /wp-admin/upload.php3.02 ▲0.0230.31 ▼4.09

Server storage [IO: ▲0.71MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Image lazyloading by Fastseen
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,731 ▲13515.92 ▲0.6711.81 ▲2.6645.30 ▼2.04
Dashboard /wp-admin2,994 ▲605.94 ▼0.01141.80 ▼8.71104.28 ▼9.35
Posts /wp-admin/edit.php2,763 ▲242.72 ▼0.0070.29 ▼0.9584.60 ▲6.06
Add New Post /wp-admin/post-new.php1,632 ▲1721.49 ▼0.01295.36 ▲3.96104.92 ▼1.79
Media Library /wp-admin/upload.php1,831 ▲245.07 ▲0.05148.00 ▼8.18110.71 ▼7.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fastseen-lazyloading/templates/admin_page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

fastseen-lazyloading/fastseen.php 92% from 13 tests

"Image lazyloading by Fastseen" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fastseen-lazyloading.php" instead of "fastseen.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin386 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions777.78%
▷ Anonymous functions222.22%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.50MB with 0.38MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png236.87KB54.97KB▼ 76.79%
assets/screenshot-2.png280.05KB68.03KB▼ 75.71%