89% simple-cleanup

Code Review | Simple Cleanup

WordPress plugin Simple Cleanup scored 89% from 54 tests.

About plugin

  • Plugin page: simple-cleanup
  • Plugin version: 0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 18, 2019
  • Latest release: Mar 20, 2023
  • Number of updates: 9
  • Update frequency: every 132.0 days
  • Top authors: multinetgmbh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 918 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Simple Cleanup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.75 ▼4.87
Dashboard /wp-admin3.32 ▲0.0245.32 ▼4.05
Posts /wp-admin/edit.php3.37 ▲0.0247.34 ▲3.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.39 ▼8.26
Media Library /wp-admin/upload.php3.25 ▲0.0236.79 ▲3.18
Simple Cleanup /wp-admin/options-general.php?page=multinet-simple-cleanup3.2130.85

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Cleanup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.24 ▼1.311.50 ▼0.2839.04 ▼7.15
Dashboard /wp-admin2,204 ▲195.81 ▲0.94102.49 ▼1.8338.06 ▼4.15
Posts /wp-admin/edit.php2,090 ▲12.03 ▲0.0134.96 ▲1.5633.24 ▼1.38
Add New Post /wp-admin/post-new.php1,537 ▼523.28 ▲4.73674.49 ▲79.0371.15 ▲22.67
Media Library /wp-admin/upload.php1,392 ▲74.19 ▼0.0194.54 ▼6.3141.69 ▲0.39
Simple Cleanup /wp-admin/options-general.php?page=multinet-simple-cleanup8632.0623.0630.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 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 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 a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 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
5 plugin tags: remove, cleanup, tidy, clean, emoji

simple-cleanup/multinet-simple-cleanup.php 85% from 13 tests

Analyzing the main PHP file in "Simple Cleanup" version 0.3
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-cleanup.php" instead of "multinet-simple-cleanup.php")
  • 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 file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected318 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP44983239
PO File1232379

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.67
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods888.89%
▷ Public methods666.67%
▷ Protected methods333.33%
▷ Private methods00.00%
Functions14
▷ Named functions00.00%
▷ Anonymous functions14100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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