99% dmo-spacer-gif-generator

Code Review | Mega Lazyload

WordPress plugin Mega Lazyload scored 99% from 54 tests.

About plugin

  • Plugin page: dmo-spacer-gif-ge...
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.1-5.3.2
  • WordPress version: 5.8.1
  • First release: Jul 4, 2018
  • Latest release: Feb 7, 2020
  • Number of updates: 13
  • Update frequency: every 45.0 days
  • Top authors: dasmoment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 548 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼141.14ms] Passed 4 tests

A check of server-side resources used by Mega Lazyload
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.0840.74 ▲2.30
Dashboard /wp-admin3.14 ▲0.0947.10 ▼0.57
Posts /wp-admin/edit.php3.25 ▲0.1451.23 ▼5.32
Add New Post /wp-admin/post-new.php5.50 ▲0.0791.54 ▼556.69
Media Library /wp-admin/upload.php3.08 ▲0.0833.50 ▼1.99
Mega Lazyload /wp-admin/options-general.php?page=mega-lazyload3.0532.69

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/dmo-spacer-gif-generator/" and "wp-content/uploads/"
    • (new file) wp-content/mll-spacer/.empty
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mega Lazyload
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,730 ▲9316.30 ▲0.3511.43 ▲1.5052.70 ▲8.77
Dashboard /wp-admin2,983 ▲495.93 ▼0.03146.00 ▲0.48110.79 ▼16.66
Posts /wp-admin/edit.php2,749 ▲102.70 ▲0.0171.90 ▼6.1495.21 ▲9.54
Add New Post /wp-admin/post-new.php1,691 ▲818.50 ▼0.26372.21 ▼19.78122.85 ▲1.89
Media Library /wp-admin/upload.php1,820 ▲105.04 ▲0.03150.92 ▼3.60114.88 ▼6.56
Mega Lazyload /wp-admin/options-general.php?page=mega-lazyload1,1372.3668.15106.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: lazyload, spacer, pagespeed lazyloading, png, spacer images

dmo-spacer-gif-generator/mll_sgg.php 77% from 13 tests

The principal PHP file in "Mega Lazyload" v. 2.1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dmo-spacer-gif-generator.php" instead of "mll_sgg.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 280 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin691 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP66552516
PO File1242489
JavaScript38485
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.20
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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