100% lazy-load-for-gmaps

Code Review | Lazy Load for GMaps

WordPress plugin Lazy Load for GMaps scored 100% from 54 tests.

About plugin

  • Plugin page: lazy-load-for-gmaps
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.3-5.3.2
  • WordPress version: 5.8.1
  • First release: Jan 23, 2020
  • Latest release: Feb 24, 2020
  • Number of updates: 9
  • Update frequency: every 3.7 days
  • Top authors: webamator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 674 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼137.50ms] Passed 4 tests

Server-side resources used by Lazy Load for GMaps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1730.04 ▲9.02
Dashboard /wp-admin3.12 ▲0.0744.26 ▲9.22
Posts /wp-admin/edit.php3.21 ▲0.1041.56 ▲6.90
Add New Post /wp-admin/post-new.php5.48 ▲0.0584.09 ▼567.29
Media Library /wp-admin/upload.php3.07 ▲0.0733.30 ▲1.38
Lazy Load GMaps /wp-admin/options-general.php?page=lazy_load_google_maps3.0429.49
Lazy Load GMaps /wp-admin/admin.php?page=lazy_load_google_maps3.0430.02
WA plugins /wp-admin/admin.php?page=wa-plugins3.0425.92

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 2 new options
New WordPress options
ll_gmaps_date_install
ll_gmaps_version

Browser metrics Passed 4 tests

Checking browser requirements for Lazy Load for GMaps
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,717 ▲12115.87 ▲0.298.66 ▲0.2847.75 ▼2.48
Dashboard /wp-admin3,003 ▲725.87 ▼0.08137.34 ▼18.30113.35 ▲6.62
Posts /wp-admin/edit.php2,775 ▲362.69 ▼0.0065.39 ▼4.6290.53 ▼2.63
Add New Post /wp-admin/post-new.php3,750 ▲6115.35 ▼0.04451.33 ▲3.1898.44 ▼13.24
Media Library /wp-admin/upload.php1,846 ▲365.12 ▲0.12145.77 ▼24.72123.06 ▲8.12
Lazy Load GMaps /wp-admin/options-general.php?page=lazy_load_google_maps1,2212.0961.2682.07
Lazy Load GMaps /wp-admin/admin.php?page=lazy_load_google_maps1,2242.0958.6485.65
WA plugins /wp-admin/admin.php?page=wa-plugins1,0452.0854.2073.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png), #2 (screenshot-2.png)
The official readme.txt might help

lazy-load-for-gmaps/lazy-load-for-gmaps.php Passed 13 tests

The entry point to "Lazy Load for GMaps" version 1.0.3 is a PHP file that has certain tags in its header comment area
86 characters long description:
This plugin make your Google Maps in publications and pages more faster via Lazy Load.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin516 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP315037307
PO File25660180
JavaScript115026
CSS1103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.50
▷ Minimum class complexity4.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png55.47KB24.74KB▼ 55.40%
screenshot-2.png48.03KB23.07KB▼ 51.96%