72% wp-customizer

Code Review | WP Customizer

WordPress plugin WP Customizer scored 72% from 54 tests.

About plugin

  • Plugin page: wp-customizer
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.8.3
  • WordPress version: 6.3.1
  • First release: Jun 5, 2013
  • Latest release: Nov 9, 2017
  • Number of updates: 8
  • Update frequency: every 202.3 days
  • Top authors: vicchi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active / 3,780 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.14MB] [CPU: ▼8.97ms] Passed 4 tests

A check of server-side resources used by WP Customizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.42 ▼1.33
Dashboard /wp-admin3.22 ▼0.0830.16 ▼18.50
Posts /wp-admin/edit.php3.28 ▼0.0748.91 ▲1.73
Add New Post /wp-admin/post-new.php5.47 ▼0.4276.36 ▼13.35
Media Library /wp-admin/upload.php3.22 ▼0.0027.57 ▼2.71
WP Customizer /wp-admin/options-general.php?page=wp-customizer/includes/class-wp-customizer-admin.php3.2028.62

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 7 new options
New WordPress options
wp_customizer_options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WP Customizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲13113.31 ▼1.081.80 ▼0.1843.77 ▼5.44
Dashboard /wp-admin2,275 ▲874.99 ▼0.92111.75 ▼4.4543.54 ▼6.71
Posts /wp-admin/edit.php2,158 ▲662.58 ▲0.5846.39 ▲7.2538.23 ▲3.85
Add New Post /wp-admin/post-new.php1,537 ▲1818.49 ▼4.85655.77 ▼24.3959.41 ▲10.04
Media Library /wp-admin/upload.php1,457 ▲724.56 ▲0.33100.78 ▼3.3646.56 ▲1.84
WP Customizer /wp-admin/options-general.php?page=wp-customizer/includes/class-wp-customizer-admin.php1,3014.9255.6063.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp-customizer/includes/class-wp-customizer-admin.php
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP 0% 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 fix the following items
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-customizer/includes/class-wp-customizer-loader.php
    • > /wp-content/plugins/wp-customizer/includes/class-wp-customizer-files.php
    • > /wp-content/plugins/wp-customizer/includes/class-wp-customizer-admin.php
    • > /wp-content/plugins/wp-customizer/includes/class-wp-customizer-pointers.php
    • > /wp-content/plugins/wp-customizer/includes/class-wp-customizer-upgrade.php
    • > /wp-content/plugins/wp-customizer/includes/class-wp-customizer.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-customizer/wp-customizer.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Settings and Options: Functions Tab with Contextual Help) image not found
The official readme.txt might help

wp-customizer/wp-customizer.php 92% from 13 tests

The entry point to "WP Customizer" version 1.0.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 163 characters long)

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,995 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP93362601,380
PO File2204256500
JavaScript35072
CSS48042
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity22.29
▷ Minimum class complexity3.00
▷ Maximum class complexity53.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods63
▷ Static methods1117.46%
▷ Public methods3860.32%
▷ Protected methods00.00%
▷ Private methods2539.68%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants1168.75%
▷ Class constants531.25%
▷ Public constants5100.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 compressed PNG files occupy 0.03MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png26.26KB16.23KB▼ 38.17%
images/error.png0.54KB0.66KB0.00%
images/success.png0.43KB0.49KB0.00%
images/warning.png0.57KB0.67KB0.00%