72% customizer-user-interface

Code Review | Customizer UI

WordPress plugin Customizer UI scored72%from 54 tests.

About plugin

  • Plugin page: customizer-user-i...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Jun 2, 2020
  • Latest release: Mar 9, 2021
  • Number of updates: 11
  • Update frequency: every 25.5 days
  • Top authors: cperko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /870 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼2.54ms] Passed 4 tests

Analyzing server-side resources used by Customizer UI
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3143.31 ▲2.31
Dashboard /wp-admin3.64 ▲0.3347.45 ▼0.16
Posts /wp-admin/edit.php3.69 ▲0.3348.99 ▲0.26
Add New Post /wp-admin/post-new.php6.17 ▲0.2985.06 ▼12.58
Media Library /wp-admin/upload.php3.50 ▲0.2737.46 ▲7.92
Section Manager /wp-admin/admin.php?page=wpcui-section-manager3.4631.83
Settings /wp-admin/admin.php?page=wpcui-settings3.4633.58
Customizer UI /wp-admin/admin.php?page=wpcui3.4830.93

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 47 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
wpcui_settings

Browser metrics Passed 4 tests

An overview of browser requirements for Customizer UI
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.20 ▼1.391.69 ▼0.2340.47 ▼1.81
Dashboard /wp-admin2,244 ▲535.85 ▼0.0599.83 ▼1.3240.79 ▼0.76
Posts /wp-admin/edit.php2,121 ▲292.00 ▼0.0434.15 ▼4.3133.02 ▼5.04
Add New Post /wp-admin/post-new.php1,543 ▲2921.34 ▲3.62588.82 ▼36.1049.14 ▼10.82
Media Library /wp-admin/upload.php1,426 ▲384.25 ▼0.0598.20 ▲4.0543.81 ▲1.75
Section Manager /wp-admin/admin.php?page=wpcui-section-manager9672.0624.3227.16
Settings /wp-admin/admin.php?page=wpcui-settings8192.0630.6929.64
Customizer UI /wp-admin/admin.php?page=wpcui8182.0423.6629.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • wpcui_settings
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wpcui-section-manager
    • > Notice in wp-content/plugins/customizer-user-interface/inc/Data/DataService.php+175
    Undefined index: core_sections

SRP 0% 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/customizer-user-interface/wpcui.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PerkoCustomizerUI\\Base\\BaseController' not found in wp-content/plugins/customizer-user-interface/inc/Pages/SectionManager.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PerkoCustomizerUI\\Base\\BaseController' not found in wp-content/plugins/customizer-user-interface/inc/Base/Activate.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/customizer-user-interface/templates/admin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PerkoCustomizerUI\\Base\\BaseController' not found in wp-content/plugins/customizer-user-interface/inc/Base/SettingsLinks.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PerkoCustomizerUI\\Base\\BaseController' not found in wp-content/plugins/customizer-user-interface/inc/Forms/AdminPageForms.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/customizer-user-interface/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PerkoCustomizerUI\\Base\\BaseController' not found in wp-content/plugins/customizer-user-interface/inc/Pages/Settings.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PerkoCustomizerUI\\Data\\DataService' not found in wp-content/plugins/customizer-user-interface/templates/section-manager.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PerkoCustomizerUI\\Base\\BaseController' not found in wp-content/plugins/customizer-user-interface/inc/Base/Deactivate.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PerkoCustomizerUI\\Base\\BaseController' not found in wp-content/plugins/customizer-user-interface/inc/Pages/Admin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
3 plugin tags: customizer, ui, user interface

customizer-user-interface/wpcui.php 85% from 13 tests

Analyzing the main PHP file in "Customizer UI" version 1.1.0
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 209 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("customizer-user-interface.php" instead of "wpcui.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,949 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP404686161,726
CSS124099
JSON30058
JavaScript113935
Markdown116023
SVG1008

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.70
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes33
▷ Abstract classes26.06%
▷ Concrete classes3193.94%
▷ Final classes13.23%
Methods125
▷ Static methods5140.80%
▷ Public methods10080.00%
▷ Protected methods00.00%
▷ Private methods2520.00%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.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
5 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png11.10KB4.70KB▼ 57.70%
assets/icon-500x500.png56.97KB20.38KB▼ 64.23%
assets/icon-128x128.png23.01KB7.69KB▼ 66.59%
assets/screenshot-1.PNG47.27KB21.02KB▼ 55.53%
assets/icon-256x256.png61.06KB19.04KB▼ 68.81%