84% better-customizer-reset

Code Review | Better Customizer Reset

WordPress plugin Better Customizer Reset scored84%from 54 tests.

About plugin

  • Plugin page: better-customizer...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 3, 2021
  • Latest release: Nov 3, 2021
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: ilovewpcom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /385 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.07MB] [CPU: ▲0.85ms] Passed 4 tests

An overview of server-side resources used by Better Customizer Reset
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0542.40 ▼2.74
Dashboard /wp-admin48.47 ▲45.129,284,459.33 ▲9,284,406.01
Posts /wp-admin/edit.php3.52 ▲0.1253.12 ▲6.09
Add New Post /wp-admin/post-new.php5.99 ▲0.0693.76 ▼2.73
Media Library /wp-admin/upload.php3.33 ▲0.0643.44 ▲2.78
Better Customizer Reset /wp-admin/tools.php?page=better-customizer-reset3.3036.50

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Better Customizer Reset
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.111.69 ▲0.0444.01 ▼3.38
Dashboard /wp-admin2,202 ▲255.63 ▲0.0686.31 ▼5.9138.72 ▼0.17
Posts /wp-admin/edit.php2,107 ▲42.00 ▼0.0235.14 ▼6.2334.69 ▲0.04
Add New Post /wp-admin/post-new.php1,529 ▲323.67 ▲0.58680.40 ▼33.2754.76 ▼4.23
Media Library /wp-admin/upload.php1,407 ▲134.19 ▼0.0298.41 ▼17.8145.43 ▼0.72
Better Customizer Reset /wp-admin/tools.php?page=better-customizer-reset9021.9924.0136.88

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
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=better-customizer-reset
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=better-customizer-reset
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: reset customizer, theme mods, reset theme, customizer reset, customizer...

better-customizer-reset/better-customizer-reset.php 85% from 13 tests

"Better Customizer Reset" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected495 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP399146249
CSS1564246

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity17.50
▷ Minimum class complexity7.00
▷ Maximum class complexity28.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods15
▷ Static methods16.67%
▷ Public methods1386.67%
▷ Protected methods00.00%
▷ Private methods213.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ilovewp-logo-dark.png2.63KB1.05KB▼ 59.97%
assets/images/bcr-logo-dark.png4.88KB1.67KB▼ 65.87%