78% sweeppress

Code Review | SweepPress

WordPress plugin SweepPress scored78%from 54 tests.

About plugin

  • Plugin page: sweeppress
  • Plugin version: 2.4.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Mar 3, 2022
  • Latest release: Oct 6, 2023
  • Number of updates: 43
  • Update frequency: every 13.7 days
  • Top authors: GDragoN (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /10,273 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼4.65ms] Passed 4 tests

A check of server-side resources used by SweepPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.17 ▼6.31
Dashboard /wp-admin3.43 ▲0.0948.98 ▼15.63
Posts /wp-admin/edit.php3.55 ▲0.1952.25 ▲1.08
Add New Post /wp-admin/post-new.php6.04 ▲0.1599.02 ▲2.26
Media Library /wp-admin/upload.php3.36 ▲0.1339.96 ▲4.47
About /wp-admin/admin.php?page=sweeppress-about3.8158.34
Tools /wp-admin/admin.php?page=sweeppress-tools3.3932.58
Statistics /wp-admin/admin.php?page=sweeppress-statistics3.6037.82
Sweepers List /wp-admin/admin.php?page=sweeppress-sweepers3.7847.27
Sweep /wp-admin/admin.php?page=sweeppress-sweep3.92149.91
Settings /wp-admin/admin.php?page=sweeppress-settings3.4834.21
Overview /wp-admin/admin.php?page=sweeppress-dashboard3.8442.68
Upgrade Pro /wp-admin/admin.php?page=sweeppress-jobs3.4736.17

Server storage [IO: ▲4.10MB] [DB: ▲0.09MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 482 new files
Database: no new tables, 12 new options
New WordPress options
d4p_blog_sweeppress_info
d4p_blog_sweeppress_core
widget_recent-posts
widget_recent-comments
d4p_blog_sweeppress_settings
d4p_blog_sweeppress_statistics
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
d4p_blog_sweeppress_sweepers
...

Browser metrics Passed 4 tests

Checking browser requirements for SweepPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲15914.73 ▲0.381.76 ▼0.0842.92 ▲1.81
Dashboard /wp-admin2,314 ▲1375.69 ▲0.1391.84 ▲1.5840.21 ▼2.75
Posts /wp-admin/edit.php2,219 ▲1192.05 ▲0.0442.12 ▲2.2338.48 ▲1.06
Add New Post /wp-admin/post-new.php1,590 ▲6417.70 ▼0.20697.11 ▲3.3459.98 ▼0.89
Media Library /wp-admin/upload.php1,519 ▲1194.27 ▲0.14108.41 ▼3.9947.35 ▼0.40
About /wp-admin/admin.php?page=sweeppress-about1,0622.2130.6248.33
Tools /wp-admin/admin.php?page=sweeppress-tools1,2622.2133.2044.12
Statistics /wp-admin/admin.php?page=sweeppress-statistics1,1722.1828.5933.40
Sweepers List /wp-admin/admin.php?page=sweeppress-sweepers1,9622.2032.7649.73
Sweep /wp-admin/admin.php?page=sweeppress-sweep3,5652.1931.8351.12
Settings /wp-admin/admin.php?page=sweeppress-settings1,2282.2430.1131.89
Overview /wp-admin/admin.php?page=sweeppress-dashboard1,8122.1940.4079.19
Upgrade Pro /wp-admin/admin.php?page=sweeppress-jobs1,2322.1930.1844.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 12 options
    • d4p_blog_sweeppress_core
    • theysaidso_admin_options
    • can_compress_scripts
    • d4p_blog_sweeppress_cache
    • widget_theysaidso_widget
    • widget_recent-posts
    • d4p_blog_sweeppress_settings
    • d4p_blog_sweeppress_statistics
    • d4p_blog_sweeppress_sweepers
    • widget_recent-comments
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=sweeppress-statistics
    • > Notice in wp-content/plugins/sweeppress/core/basic/Settings.php+221
    Undefined index: size

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Dev4Press\\Plugin\\SweepPress\\Base\\Sweeper' not found in wp-content/plugins/sweeppress/core/base/sweep/ActionSchedulerActions.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Dev4Press\\Plugin\\SweepPress\\Base\\Sweep\\ActionSchedulerActions' not found in wp-content/plugins/sweeppress/core/sweeper/ActionSchedulerActionsFailed.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Dev4Press\\Plugin\\SweepPress\\Base\\Sweeper' not found in wp-content/plugins/sweeppress/core/sweeper/ActionSchedulerLog.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/sweeppress/sweeppress.php:38
    • > PHP Fatal error
      Uncaught Error: Call to a member function is_no_size() on null in wp-content/plugins/sweeppress/forms/misc-sweep-single.php:6
    • > PHP Notice
      Undefined variable: sweeper in wp-content/plugins/sweeppress/forms/misc-sweep-single.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Dev4Press\\Plugin\\SweepPress\\Base\\Sweep\\ActionSchedulerActions' not found in wp-content/plugins/sweeppress/core/sweeper/ActionSchedulerActionsCanceled.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Dev4Press\\Plugin\\SweepPress\\Base\\Sweep\\ActionSchedulerActions' not found in wp-content/plugins/sweeppress/core/sweeper/ActionSchedulerActionsComplete.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6, #7 in sweeppress/assets to your readme.txt
You can look at the official readme.txt

sweeppress/sweeppress.php Passed 13 tests

The entry point to "SweepPress" version 2.4.2 is a PHP file that has certain tags in its header comment area
119 characters long description:
Remove various old, unused, or obsolete data from the database, optimize the database for the best website performance.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected43,288 lines of code in 435 files:
LanguageFilesBlank linesComment linesLines of code
PHP2685,9312,93423,153
CSS411,2143911,173
Sass54887265,170
JavaScript703891083,764
Markdown212028

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.62
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces43
Interfaces0
Traits3
Classes196
▷ Abstract classes5126.02%
▷ Concrete classes14573.98%
▷ Final classes21.38%
Methods1,694
▷ Static methods26215.47%
▷ Public methods1,36480.52%
▷ Protected methods26715.76%
▷ Private methods633.72%
Functions18
▷ Named functions1583.33%
▷ Anonymous functions316.67%
Constants55
▷ Global constants814.55%
▷ Class constants4785.45%
▷ Public constants47100.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 compressed PNG files occupy 0.06MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
d4plib/resources/vendor/flags/img/flag_placeholder.png0.09KB0.09KB0.00%
d4plib/resources/vendor/flags/img/flags_responsive.png54.14KB57.01KB0.00%
d4plib/resources/gfx/buy_me_a_coffee.png7.73KB7.79KB0.00%