83% lazyload-preload-and-more

Code Review | Lazyload, Preload, and More!

WordPress plugin Lazyload, Preload, and More! scored83%from 54 tests.

About plugin

  • Plugin page: lazyload-preload-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: May 3, 2023
  • Latest release: Oct 9, 2023
  • Number of updates: 6
  • Update frequency: every 26.5 days
  • Top authors: aryadhiratara (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /320 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
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.95ms] Passed 4 tests

Analyzing server-side resources used by Lazyload, Preload, and More!
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1544.16 ▼7.54
Dashboard /wp-admin3.43 ▲0.1353.22 ▲3.15
Posts /wp-admin/edit.php3.48 ▲0.1347.94 ▼0.12
Add New Post /wp-admin/post-new.php6.01 ▲0.1386.04 ▲0.89
Media Library /wp-admin/upload.php3.36 ▲0.1339.92 ▲2.96

Server storage [IO: ▲0.04MB] [DB: ▲0.64MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lazyload, Preload, and More!
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,771 ▼1514.30 ▼0.341.78 ▼0.7347.15 ▲1.42
Dashboard /wp-admin2,192 ▲125.66 ▼0.03109.47 ▲16.5948.32 ▲5.64
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.1240.54 ▲1.4038.40 ▲2.33
Add New Post /wp-admin/post-new.php1,554 ▲823.44 ▲0.22655.57 ▼46.9058.56 ▲5.30
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.02106.75 ▲5.7346.99 ▼0.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/lazyload-preload-and-more/vendor/js/index.php
    • > /wp-content/plugins/lazyload-preload-and-more/includes/index.php
    • > /wp-content/plugins/lazyload-preload-and-more/vendor/index.php
    • > /wp-content/plugins/lazyload-preload-and-more/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
Please take inspiration from this readme.txt

lazyload-preload-and-more/plugin.php 85% from 13 tests

The main file in "Lazyload, Preload, and More!" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lazyload-preload-and-more.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin510 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP322564509
JavaScript1011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity117.00
▷ Minimum class complexity117.00
▷ Maximum class complexity117.00
Average method complexity8.67
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1275.00%
▷ Protected methods00.00%
▷ Private methods425.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants9
▷ Global constants444.44%
▷ Class constants555.56%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin