84% lazy-optimization

Code Review | Lazy Optimization

WordPress plugin Lazy Optimization scored84%from 54 tests.

About plugin

  • Plugin page: lazy-optimization
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Jan 16, 2020
  • Latest release: Nov 24, 2020
  • Number of updates: 14
  • Update frequency: every 22.4 days
  • Top authors: yasir129 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,531 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.69ms] Passed 4 tests

Server-side resources used by Lazy Optimization
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.54 ▼2.21
Dashboard /wp-admin3.38 ▲0.0349.73 ▼16.45
Posts /wp-admin/edit.php3.43 ▲0.0750.21 ▲1.39
Add New Post /wp-admin/post-new.php5.96 ▲0.0790.87 ▼13.49
Media Library /wp-admin/upload.php3.30 ▲0.0739.69 ▲6.46
Lazy Optimization /wp-admin/options-general.php?page=lazy-optimization-setting-page3.2734.34

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lazy Optimization
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲1314.65 ▲0.331.75 ▼0.2539.92 ▼1.85
Dashboard /wp-admin2,205 ▲315.58 ▼0.0987.01 ▼7.0641.86 ▼1.99
Posts /wp-admin/edit.php2,114 ▲142.03 ▲0.0438.56 ▼1.2334.70 ▼0.37
Add New Post /wp-admin/post-new.php1,556 ▲3023.31 ▲5.70653.52 ▼11.8963.17 ▲2.92
Media Library /wp-admin/upload.php1,410 ▲104.33 ▲0.12108.45 ▲0.3447.98 ▲1.76
Lazy Optimization /wp-admin/options-general.php?page=lazy-optimization-setting-page8522.0727.8428.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× 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-optimization/admin/admin-settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

lazy-optimization/lazy-optimization.php Passed 13 tests

The main file in "Lazy Optimization" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
59 characters long description:
Lazy load background images that are in external CSS files.

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 plugin358 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP410137358

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
PNG images were not found in this plugin