90% lazyload-post-gallery

Code Review | LazyLoad Post Gallery

WordPress plugin LazyLoad Post Gallery scored90%from 54 tests.

About plugin

  • Plugin page: lazyload-post-gal...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: May 2, 2017
  • Latest release: May 2, 2017
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: webstartup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /723 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.00ms] Passed 4 tests

A check of server-side resources used by LazyLoad Post Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.95 ▲2.19
Dashboard /wp-admin3.34 ▼0.0146.69 ▼8.65
Posts /wp-admin/edit.php3.39 ▲0.0344.30 ▼1.11
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.73 ▼1.29
Media Library /wp-admin/upload.php3.26 ▲0.0333.86 ▼0.94

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 13 new options
New WordPress options
slwsu_lazyload_post_gallery_styles
slwsu_lazyload_post_gallery_delete_options
slwsu_lazyload_post_gallery_grouper
widget_theysaidso_widget
slwsu_lazyload_post_gallery_carousel_caption
theysaidso_admin_options
slwsu_lazyload_post_gallery_carousel_description
widget_recent-comments
slwsu_lazyload_post_gallery_gallery_title
widget_recent-posts
...

Browser metrics Passed 4 tests

LazyLoad Post Gallery: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.30 ▼1.081.84 ▲0.0842.66 ▲1.91
Dashboard /wp-admin2,222 ▲344.84 ▼1.17103.08 ▲0.1741.84 ▲4.16
Posts /wp-admin/edit.php2,105 ▲162.04 ▼0.0237.57 ▼0.7434.29 ▲1.51
Add New Post /wp-admin/post-new.php1,555 ▲2718.66 ▲0.48635.04 ▲15.0449.95 ▼11.97
Media Library /wp-admin/upload.php1,404 ▲164.20 ▲0.0499.78 ▲1.4642.42 ▼0.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: lazy loading, responsive gallery, gallery, media gallery, media...

lazyload-post-gallery/lazyload-post-gallery.php 92% from 13 tests

The entry point to "LazyLoad Post Gallery" version 0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
No dangerous file extensions were detected1,907 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3148317935
PHP12161267703
CSS23748146
PO File14747123

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods55
▷ Static methods1730.91%
▷ Public methods5090.91%
▷ Protected methods00.00%
▷ Private methods59.09%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin