84% lazy-load-with-base64-for-pagespeed-online

Code Review | Lazy Load with Base64 for Pagespeed online

WordPress plugin Lazy Load with Base64 for Pagespeed online scored84%from 54 tests.

About plugin

  • Plugin page: lazy-load-with-ba...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.4
  • WordPress version: 6.3.1
  • First release: Nov 25, 2019
  • Latest release: May 12, 2020
  • Number of updates: 21
  • Update frequency: every 8.3 days
  • Top authors: hansoftech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /821 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Lazy Load with Base64 for Pagespeed online
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.00 ▲4.54
Dashboard /wp-admin3.32 ▲0.0245.70 ▼0.81
Posts /wp-admin/edit.php3.37 ▲0.0148.10 ▲3.93
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.32 ▼11.31
Media Library /wp-admin/upload.php3.24 ▲0.0142.05 ▲7.87

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Lazy Load with Base64 for Pagespeed online
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.58 ▼0.801.71 ▼0.0743.15 ▲1.54
Dashboard /wp-admin2,229 ▲445.86 ▲0.0796.18 ▼3.3080.04 ▲37.22
Posts /wp-admin/edit.php2,112 ▲231.98 ▼0.0036.85 ▲2.3234.65 ▼0.78
Add New Post /wp-admin/post-new.php1,535 ▲1517.47 ▼5.63680.45 ▼6.8656.92 ▲1.15
Media Library /wp-admin/upload.php1,408 ▲204.27 ▼0.01102.69 ▼6.6045.50 ▲1.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lazy-load-with-base64-for-pagespeed-online/UI/base64_userinterface_settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lazy-load-with-base64-for-pagespeed-online/UI/base64_userinterface_settings.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: lazy load, encoding, thumbnail, image optimization, base64

lazy-load-with-base64-for-pagespeed-online/base64.php 85% from 13 tests

The main PHP file in "Lazy Load with Base64 for Pagespeed online" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lazy-load-with-base64-for-pagespeed-online.php" instead of "base64.php")

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
Success! There were no dangerous files found in this plugin910 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP31018607
JavaScript3321224
CSS14079

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
UI/css/images/transparent-icon-image32px.png4.48KB1.38KB▼ 69.20%
UI/css/images/transparent-icon-image24px.png4.39KB1.35KB▼ 69.14%