82% hide-wp-customizer-options

Code Review | Hide WP Customizer Options

WordPress plugin Hide WP Customizer Options scored 82% from 54 tests.

About plugin

  • Plugin page: hide-wp-customize...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.1.0
  • WordPress version: 5.8.1
  • First release: Jan 27, 2015
  • Latest release: Jan 27, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: nickburne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,253 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Hide WP Customizer Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0030.84 ▼5.69
Dashboard /wp-admin3.07 ▲0.0247.80 ▼0.39
Posts /wp-admin/edit.php3.12 ▲0.0241.35 ▼6.78
Add New Post /wp-admin/post-new.php5.43 ▼0.0088.55 ▼556.92
Media Library /wp-admin/upload.php3.01 ▲0.0132.38 ▲5.29
Customizer /wp-admin/options-general.php?page=pp-customizer-customizer4.8684.27

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 1 new option
New WordPress options
pp-customizer-customizer-version

Browser metrics Passed 4 tests

A check of browser resources used by Hide WP Customizer Options
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.84 ▲0.389.96 ▼1.6744.67 ▼5.09
Dashboard /wp-admin2,972 ▲356.00 ▲0.08145.31 ▼1.91110.08 ▼4.37
Posts /wp-admin/edit.php2,744 ▲52.70 ▼0.0267.33 ▼0.4688.15 ▼4.03
Add New Post /wp-admin/post-new.php1,678 ▲17818.80 ▲0.04408.13 ▼1.53106.51 ▼5.55
Media Library /wp-admin/upload.php1,812 ▲55.03 ▼0.02149.99 ▼9.70115.03 ▼0.30
Customizer /wp-admin/options-general.php?page=pp-customizer-customizer1,1742.2155.7077.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • pp-customizer-customizer-version

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
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pp-customizer-customizer
    • > Warning in wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php+39
    Creating default object from empty value

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 76% from 29 tests

readme.txt 81% from 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
Please fix the following attributes:
  • Tags: The plugin tags were not defined
  • Screenshots: Screenshot #1 (Admin screen) image not found
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

hide-wp-customizer-options/customizer-customizer.php 69% from 13 tests

The entry point to "Hide WP Customizer Options" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.1.0" instead of "4.0.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hide-wp-customizer-options.php" instead of "customizer-customizer.php")

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
There were no executable files found in this plugin771 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6202643771

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity22.40
▷ Minimum class complexity3.00
▷ Maximum class complexity51.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes360.00%
Methods59
▷ Static methods35.08%
▷ Public methods4576.27%
▷ Protected methods813.56%
▷ Private methods610.17%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png115.07KB38.83KB▼ 66.26%