84% sb-clean

Code Review | SB Clean

WordPress plugin SB Clean scored 84% from 54 tests.

About plugin

  • Plugin page: sb-clean
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2014
  • Latest release: Apr 9, 2015
  • Number of updates: 15
  • Update frequency: every 13.1 days
  • Top authors: skylarkcob (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,420 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.01MB] [CPU: ▲1.00ms] Passed 4 tests

A check of server-side resources used by SB Clean
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0148.30 ▲11.15
Dashboard /wp-admin3.32 ▲0.0145.39 ▼1.20
Posts /wp-admin/edit.php3.37 ▲0.0147.12 ▲0.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.38 ▲2.46
Media Library /wp-admin/upload.php3.24 ▲0.0136.44 ▲1.82

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

SB Clean: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.75 ▼0.885.33 ▲3.5440.92 ▲2.45
Dashboard /wp-admin2,206 ▲185.84 ▼0.06107.17 ▲1.9941.96 ▲2.05
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0138.84 ▲2.5836.29 ▲3.89
Add New Post /wp-admin/post-new.php1,539 ▲1423.25 ▲0.11609.67 ▼109.8153.27 ▼10.48
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0495.88 ▼5.0242.55 ▼4.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant SB_CLEAN_INC_PATH - assumed 'SB_CLEAN_INC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sb-clean/inc/sb-plugin-load.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sb_clean_get_option() in wp-content/plugins/sb-clean/inc/sb-plugin-hook.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sb-clean/inc/sb-plugin-install.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/sb-clean/sb-clean.php:19
    • > PHP Warning
      require(SB_CLEAN_INC_PATH/sb-plugin-install.php): failed to open stream: No such file or directory in wp-content/plugins/sb-clean/inc/sb-plugin-load.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sb-clean/inc/sb-plugin-functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sb-clean/inc/sb-plugin-ajax.php:8
    • > PHP Fatal error
      require(): Failed opening required 'SB_CLEAN_INC_PATH/sb-plugin-install.php' (include_path='.:/usr/share/php') in wp-content/plugins/sb-clean/inc/sb-plugin-load.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sb-clean/inc/sb-plugin-admin.php:5

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 on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (The option page for plugin SB Clean.) image required
The official readme.txt might help

sb-clean/sb-clean.php Passed 13 tests

The principal PHP file in "SB Clean" v. 1.0.8 is loaded by WordPress automatically on each request
65 characters long description:
SB Clean is a plugin that allows to clean up your WordPress site.

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
No dangerous file extensions were detected257 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP83411208
PO File18835
JavaScript10014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.52KB11.91KB▼ 53.35%