84% unveil-lazy-load

Code Review | Unveil Lazy Load

WordPress plugin Unveil Lazy Load scored84%from 54 tests.

About plugin

  • Plugin page: unveil-lazy-load
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.0
  • WordPress version: 6.3.1
  • First release: Aug 20, 2013
  • Latest release: Sep 5, 2014
  • Number of updates: 39
  • Update frequency: every 9.8 days
  • Top authors: marubon (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

4,000+ active /53,885 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.69ms] Passed 4 tests

Server-side resources used by Unveil Lazy Load
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.02 ▼4.11
Dashboard /wp-admin3.32 ▲0.0250.30 ▼5.05
Posts /wp-admin/edit.php3.37 ▲0.0148.63 ▼4.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.22 ▼17.38
Media Library /wp-admin/upload.php3.24 ▲0.0138.85 ▲1.71

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Unveil Lazy Load: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,035 ▲27413.57 ▼0.7816.50 ▲14.2639.38 ▼1.62
Dashboard /wp-admin2,192 ▲145.51 ▼0.1283.30 ▼17.2439.19 ▼4.18
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0236.80 ▼1.0632.69 ▼4.12
Add New Post /wp-admin/post-new.php1,537 ▲1118.70 ▼4.37620.20 ▼64.3078.19 ▲25.00
Media Library /wp-admin/upload.php1,397 ▼04.18 ▼0.2098.16 ▼14.2641.10 ▼6.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/unveil-lazy-load/unveil-lazy-load.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

unveil-lazy-load/unveil-lazy-load.php 92% from 13 tests

The main PHP script in "Unveil Lazy Load" version 0.3.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 292 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin97 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1282864
JavaScript231433

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods342.86%
▷ Protected methods00.00%
▷ Private methods457.14%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin