72% customizer

Code Review | Customizer

WordPress plugin Customizer scored 72% from 54 tests.

About plugin

  • Plugin page: customizer
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8.1
  • WordPress version: 5.9.2
  • First release: Jun 15, 2012
  • Latest release: Feb 2, 2014
  • Number of updates: 10
  • Update frequency: every 59.7 days
  • Top authors: amielucha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active / 13,848 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼299.34ms] Passed 4 tests

Analyzing server-side resources used by Customizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0962.95 ▲3.80
Dashboard /wp-admin3.48 ▲0.0733.51 ▼43.84
Posts /wp-admin/edit.php3.70 ▲0.0669.46 ▲29.35
Add New Post /wp-admin/post-new.php6.94 ▼0.0392.13 ▼1,160.99
Media Library /wp-admin/upload.php3.35 ▲0.0628.24 ▲3.67
Customizer /wp-admin/options-general.php?page=customizer_options_panel3.3024.73
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php4.6146.15

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 2 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Customizer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,828 ▲10616.46 ▲1.167.79 ▲1.673.05 ▲0.79
Dashboard /wp-admin2,911 ▲536.38 ▲0.08124.42 ▼14.28157.06 ▼14.33
Posts /wp-admin/edit.php2,688 ▼63.31 ▲0.0767.64 ▼39.00155.65 ▼3.09
Add New Post /wp-admin/post-new.php1,674 ▲816.58 ▼4.10443.40 ▼45.63194.44 ▲17.11
Media Library /wp-admin/upload.php1,717 ▲195.60 ▲0.07149.97 ▲8.54208.42 ▲17.25
Customizer /wp-admin/options-general.php?page=customizer_options_panel1,1112.6557.04121.01
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php7,30320.02542.91169.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 2 options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=customizer_options_panel
    • > Notice in wp-content/plugins/customizer/customizer_options.php+109
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > POST request to /wp-content/plugins/customizer/customizer_ajax.php
    • > Warning in wp-content/plugins/customizer/customizer_ajax.php+171
    Invalid argument supplied for foreach()

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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/customizer/customizer.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/customizer/customizer_options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/customizer/customizer_shortcodes.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=customizer_options_panel
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: $(...).sortable is not a function" "TypeError: $(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/customizer/customizer.js?ver=20120520:351:37)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=customizer_options_panel
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: $(...).sortable is not a function


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Panel created with Customizer), #2 (Customizer allows adding panels in front-end editor)
The official readme.txt might help

customizer/customizer.php 92% from 13 tests

The main PHP script in "Customizer" version 0.7 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 172 characters long)

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
Good job! No executable or dangerous file extensions detected1,896 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of 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.60
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions24100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
4 PNG files occupy 0.34MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png135.00KB85.94KB▼ 36.34%
screenshot-1.png149.67KB66.18KB▼ 55.78%