84% customizer-search

Code Review | Customizer Search

WordPress plugin Customizer Search scored84%from 54 tests.

About plugin

  • Plugin page: customizer-search
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jul 31, 2017
  • Latest release: Aug 21, 2023
  • Number of updates: 24
  • Update frequency: every 92.2 days
  • Top authors: Nikschavan (95.83%)patilvikasj (8.33%)

Code review

54 tests

User reviews

9 reviews

Install metrics

80,000+ active /576,579 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 gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼8.71ms] Passed 4 tests

A check of server-side resources used by Customizer Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1141.19 ▼8.23
Dashboard /wp-admin3.44 ▲0.1054.94 ▼12.67
Posts /wp-admin/edit.php3.56 ▲0.2053.67 ▲5.95
Add New Post /wp-admin/post-new.php6.04 ▲0.1683.98 ▼18.53
Media Library /wp-admin/upload.php3.37 ▲0.1439.86 ▲4.59

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Customizer Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.35 ▼0.012.07 ▲0.0241.73 ▼0.47
Dashboard /wp-admin2,198 ▲215.63 ▼0.0396.53 ▲3.8340.98 ▼2.66
Posts /wp-admin/edit.php2,097 ▼31.99 ▲0.0236.61 ▼0.9033.18 ▼3.70
Add New Post /wp-admin/post-new.php1,526 ▼223.48 ▲0.08689.77 ▲28.5757.99 ▲3.69
Media Library /wp-admin/upload.php1,403 ▼04.15 ▼0.15100.14 ▼3.6046.18 ▲1.39

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
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/customizer-search/templates/admin-customize-js-templates.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/customizer-search/class-customizer-search.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/customizer-search/customizer-search.php:16

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: The official readme.txt is a good inspiration

customizer-search/customizer-search.php Passed 13 tests

"Customizer Search" version 1.1.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
34 characters long description:
Search for settings in customizer.

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
Good job! No executable or dangerous file extensions detected998 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP7212517673
JavaScript35874176
CSS5300146
JSON1103

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity21.00
▷ Minimum class complexity2.00
▷ Maximum class complexity46.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods54
▷ Static methods1018.52%
▷ Public methods3768.52%
▷ Protected methods00.00%
▷ Private methods1731.48%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected