79% lws-cleaner

Code Review | LWS Cleaner

WordPress plugin LWS Cleaner scored 79% from 54 tests.

About plugin

  • Plugin page: lws-cleaner
  • Plugin version: 2.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 20, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 19
  • Update frequency: every 17.2 days
  • Top authors: aurelienlws (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

4,000+ active / 15,015 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.24MB] [CPU: ▼7.04ms] Passed 4 tests

A check of server-side resources used by LWS Cleaner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2539.70 ▼0.80
Dashboard /wp-admin3.54 ▲0.2447.57 ▲0.26
Posts /wp-admin/edit.php3.65 ▲0.3044.13 ▼9.12
Add New Post /wp-admin/post-new.php6.12 ▲0.2484.48 ▼18.49
Media Library /wp-admin/upload.php3.46 ▲0.2336.34 ▲2.56

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 98 new files
Database: 1 new table, 6 new options
New tables
wp_lws_cl_ignore
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for LWS Cleaner
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲12513.36 ▼1.224.80 ▲2.9940.27 ▼4.70
Dashboard /wp-admin2,269 ▲785.85 ▲0.9597.82 ▼2.5273.77 ▲31.56
Posts /wp-admin/edit.php2,149 ▲572.01 ▼0.0434.60 ▼8.9237.45 ▲2.49
Add New Post /wp-admin/post-new.php1,573 ▲5923.04 ▲5.35685.42 ▲74.0059.95 ▲11.71
Media Library /wp-admin/upload.php1,451 ▲694.09 ▼0.1598.11 ▼1.8888.22 ▲46.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/lws-cleaner/views/lws_cl_main_pages.php
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/lws-cleaner/views/lws_cl_form_ignore_media.php:3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/lws-cleaner/views/lws_cl_main_pages.php on line 2
    • > PHP Notice
      Undefined variable: plugin_lists in wp-content/plugins/lws-cleaner/views/lws_cl_main_pages.php on line 2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/lws-cleaner/views/lws_cl_main_pages.php on line 82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/lws-cleaner/views/lws_cl_tabs.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/lws-cleaner/views/lws_cl_form_delete_media.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lws-cleaner/views/lws_cl_files.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lws-cleaner/views/lws_cl_medias.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/lws-cleaner/views/lws_cl_form_unignore_media.php:2
    • > PHP Notice
      Undefined variable: plugin_lists in wp-content/plugins/lws-cleaner/views/lws_cl_main_pages.php on line 82

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: optimisation, lws, cleaning

lws-cleaner/lws-cleaner.php Passed 13 tests

Analyzing the main PHP file in "LWS Cleaner" version 2.4
138 characters long description:
With LWS Cleaner, clean your website, it's fast and easy. Clean your posts, comments, terms, users or even unused medias with this plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin5,038 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
PHP92472122,163
SVG714661,393
CSS2187721,116
PO File1177183366

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.50
▷ Minimum class complexity7.00
▷ Maximum class complexity10.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1982.61%
▷ Protected methods417.39%
▷ Private methods00.00%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-256x256.png36.35KB9.15KB▼ 74.82%
images/logo.png1.66KB1.64KB▼ 1.18%
images/logo_lws.png7.05KB3.16KB▼ 55.23%