72% customizer

Code Review | Customizer

WordPress plugin Customizer scored72%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: 6.3.1
  • 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

300+ active /14,204 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.80ms] Passed 4 tests

An overview of server-side resources used by Customizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.72 ▲0.35
Dashboard /wp-admin3.36 ▲0.0647.32 ▼7.48
Posts /wp-admin/edit.php3.42 ▲0.0646.97 ▼7.64
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.44 ▼16.43
Media Library /wp-admin/upload.php3.29 ▲0.0647.85 ▲9.29
Customizer /wp-admin/options-general.php?page=customizer_options_panel3.2332.35

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Customizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.54 ▼0.173.07 ▲1.4042.36 ▼0.10
Dashboard /wp-admin2,206 ▲385.73 ▲0.0689.83 ▼1.7737.74 ▼9.30
Posts /wp-admin/edit.php2,110 ▲72.08 ▲0.0740.60 ▼3.6233.28 ▼7.31
Add New Post /wp-admin/post-new.php1,535 ▲723.56 ▲0.59703.37 ▲21.7463.33 ▲2.17
Media Library /wp-admin/upload.php1,408 ▲84.55 ▲0.32119.64 ▲6.9748.54 ▼2.09
Customizer /wp-admin/options-general.php?page=customizer_options_panel8782.0725.5829.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > 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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/customizer/customizer_shortcodes.php:20
    • > 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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues 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=6.3.1 1:28609 "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=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" 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=6.3.1 1:28721 Uncaught TypeError: $(...).sortable is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Panel created with Customizer), #2 (Customizer allows adding panels in front-end editor)
The official readme.txt is a good inspiration

customizer/customizer.php 92% from 13 tests

The principal PHP file in "Customizer" v. 0.7 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,896 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32252031,333
PHP510789478
CSS1311485

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
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
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%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
bg.png4.53KB4.60KB0.00%
screenshot-2.png135.00KB85.94KB▼ 36.34%
screenshot-1.png149.67KB66.18KB▼ 55.78%
header.png58.26KB61.52KB0.00%