10% wp-clean

Code Review | WP Clean

WordPress plugin WP Clean scored10%from 54 tests.

About plugin

  • Plugin page: wp-clean
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 8, 2016
  • Latest release: May 25, 2023
  • Number of updates: 35
  • Update frequency: every 70.0 days
  • Top authors: Sannikov1994 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,379 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/wp-clean/condition/archives_pages.php+7
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.96MB] [CPU: ▼48.84ms] Passed 4 tests

A check of server-side resources used by WP Clean
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.89 ▼33.06
Dashboard /wp-admin2.05 ▼1.266.34 ▼37.58
Posts /wp-admin/edit.php2.05 ▼1.316.54 ▼40.06
Add New Post /wp-admin/post-new.php2.05 ▼3.847.26 ▼84.65
Media Library /wp-admin/upload.php2.05 ▼1.185.68 ▼27.77
Постраничная навигация /wp-admin/admin.php?page=wpclean_dashboard_pagination2.055.93
Безопасность /wp-admin/admin.php?page=wpclean_dashboard_security2.055.68
RSS /wp-admin/admin.php?page=wpclean_dashboard_rss2.055.88
Обновления /wp-admin/admin.php?page=wpclean_dashboard_update2.056.18
Виджеты /wp-admin/admin.php?page=wpclean_dashboard_widget2.056.80
Архивные страницы /wp-admin/admin.php?page=wpclean_dashboard_archives_pages2.055.49
Интерфейс /wp-admin/admin.php?page=wpclean_dashboard_interface2.056.26
Профиль пользователя /wp-admin/admin.php?page=wpclean_dashboard_profile2.056.77
Вложения /wp-admin/admin.php?page=wpclean_dashboard_attachments2.056.74
Комментарии /wp-admin/admin.php?page=wpclean_dashboard_comments2.056.08

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

WP Clean: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲14213.24 ▼1.321.62 ▼0.1842.73 ▲3.23
Dashboard /wp-admin2,283 ▲1034.86 ▼1.05105.89 ▼3.8641.41 ▼2.80
Posts /wp-admin/edit.php2,166 ▲732.02 ▲0.0339.42 ▼3.0035.46 ▲2.23
Add New Post /wp-admin/post-new.php1,574 ▲3117.63 ▼0.79659.73 ▲7.3348.30 ▼15.45
Media Library /wp-admin/upload.php1,468 ▲774.22 ▼0.0894.74 ▼3.8043.37 ▼2.18
Постраничная навигация /wp-admin/admin.php?page=wpclean_dashboard_pagination8672.0324.4329.29
Безопасность /wp-admin/admin.php?page=wpclean_dashboard_security1,0052.0322.5126.54
RSS /wp-admin/admin.php?page=wpclean_dashboard_rss9122.0321.0623.40
Обновления /wp-admin/admin.php?page=wpclean_dashboard_update9282.0322.1324.45
Виджеты /wp-admin/admin.php?page=wpclean_dashboard_widget1,0232.0323.7528.19
Архивные страницы /wp-admin/admin.php?page=wpclean_dashboard_archives_pages9142.0625.3423.66
Интерфейс /wp-admin/admin.php?page=wpclean_dashboard_interface9332.0224.6426.17
Профиль пользователя /wp-admin/admin.php?page=wpclean_dashboard_profile8672.0725.6229.12
Вложения /wp-admin/admin.php?page=wpclean_dashboard_attachments8892.0222.7024.41
Комментарии /wp-admin/admin.php?page=wpclean_dashboard_comments9092.0223.8727.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-clean/condition/archives_pages.php+7
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 1092 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpclean_dashboard_comments
    • > Notice in wp-content/plugins/wp-clean/fields/comments.php+77
    Trying to access array offset on value of type bool

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/wp-clean/wp-clean.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-clean/condition/widgets.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-clean/condition/update.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-clean/condition/interface.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-clean/condition/search.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-clean/condition/security.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-clean/condition/posts.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-clean/condition/attachments.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-clean/condition/profile.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-clean/condition/archives_pages.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-clean/condition/pagination.php:6

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
No tags were found

wp-clean/wp-clean.php 92% from 13 tests

The main PHP script in "WP Clean" version 2.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 226 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin2,583 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP461,1274652,520
CSS14063

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions255
▷ Named functions19174.90%
▷ Anonymous functions6425.10%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected