89% leverage-browser-caching

Code Review | Leverage Browser Caching

WordPress plugin Leverage Browser Caching scored 89% from 54 tests.

About plugin

  • Plugin page: leverage-browser-...
  • Plugin version: 2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 3, 2017
  • Latest release: Sep 23, 2023
  • Number of updates: 29
  • Update frequency: every 78.5 days
  • Top authors: rinkuyadav999 (100%)

Code review

54 tests

User reviews

41 reviews

Install metrics

20,000+ active / 367,229 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Leverage Browser Caching
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.15 ▼7.79
Dashboard /wp-admin3.31 ▲0.0148.09 ▲2.51
Posts /wp-admin/edit.php3.36 ▲0.0144.29 ▼3.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.42 ▲8.18
Media Library /wp-admin/upload.php3.24 ▲0.0137.37 ▲6.33

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • Illegal file modification detected: 1 file (1.24KB) outside of "wp-content/plugins/leverage-browser-caching/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Leverage Browser Caching: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1114.48 ▲1.091.71 ▲0.0340.27 ▼5.95
Dashboard /wp-admin2,203 ▼35.81 ▲0.9395.55 ▼13.4339.12 ▲1.08
Posts /wp-admin/edit.php2,089 ▼02.18 ▲0.1740.23 ▲0.3635.64 ▼0.77
Add New Post /wp-admin/post-new.php1,546 ▲3218.49 ▲0.96659.32 ▼4.9556.92 ▲2.35
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.00108.34 ▲7.3045.70 ▼0.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: caching, leverage, browser

leverage-browser-caching/leverage-browser-caching.php 85% from 13 tests

The main PHP script in "Leverage Browser Caching" version 2.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin118 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24197118

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin