84% wp-sanitize

Code Review | WP Sanitize : Auto WordPress Optimizer Plugin

WordPress plugin WP Sanitize : Auto WordPress Optimizer Plugin scored84%from 54 tests.

About plugin

  • Plugin page: wp-sanitize
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.2.1
  • WordPress version: 6.3.1
  • First release: Oct 25, 2011
  • Latest release: Oct 25, 2011
  • Number of updates: 10
  • Update frequency: every 147.6 days
  • Top authors: wpthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /6,624 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: ▼0.99ms] Passed 4 tests

This is a short check of server-side resources used by WP Sanitize : Auto WordPress Optimizer Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.15 ▼0.44
Dashboard /wp-admin3.31 ▲0.0144.54 ▼3.22
Posts /wp-admin/edit.php3.36 ▲0.0146.03 ▼1.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.11 ▲3.89
Media Library /wp-admin/upload.php3.23 ▲0.0136.05 ▲1.55
WP Sanitize /wp-admin/options-general.php?page=wp_sanitize3.2030.60

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
wpsanitize
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP Sanitize : Auto WordPress Optimizer Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.15 ▼1.501.97 ▲0.2740.31 ▼3.86
Dashboard /wp-admin2,207 ▲165.84 ▼0.0497.85 ▼5.9535.87 ▼5.75
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0239.03 ▲3.6633.52 ▼2.08
Add New Post /wp-admin/post-new.php1,517 ▲317.59 ▲0.04592.15 ▼58.6560.35 ▲13.97
Media Library /wp-admin/upload.php1,392 ▲74.18 ▼0.0698.36 ▼1.5446.01 ▲4.34
WP Sanitize /wp-admin/options-general.php?page=wp_sanitize9142.0528.9025.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • wpsanitize
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/wp-sanitize/wp-sanitize.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Screenshot #1 (WP Sanitize settings page) image required
You can take inspiration from this readme.txt

wp-sanitize/wp-sanitize.php Passed 13 tests

This is the main PHP file of "WP Sanitize : Auto WordPress Optimizer Plugin" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
43 characters long description:
A super-simple plugin to optimize your blog

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin122 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13521122

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png94.89KB25.96KB▼ 72.64%