77% wp-custom-fields-search

Code Review | WP Custom Fields Search

WordPress plugin WP Custom Fields Search scored77%from 54 tests.

About plugin

  • Plugin page: wp-custom-fields-...
  • Plugin version: 1.2.35
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.1+
  • WordPress version: 6.3.1
  • First release: Mar 23, 2009
  • Latest release: Jan 12, 2023
  • Number of updates: 343
  • Update frequency: every 14.7 days
  • Top authors: don@don-benjamin.co.uk (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

3,000+ active /184,449 total downloads

Benchmarks

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.05MB] [CPU: ▼4.26ms] Passed 4 tests

Analyzing server-side resources used by WP Custom Fields Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0446.56 ▲5.02
Dashboard /wp-admin3.35 ▲0.0454.60 ▲1.30
Posts /wp-admin/edit.php3.46 ▲0.1147.73 ▼6.51
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.82 ▼10.88
Media Library /wp-admin/upload.php3.27 ▲0.0438.84 ▼0.93

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_wp_custom_fields_search
theysaidso_admin_options
widget_theysaidso_widget
wp_custom_fields_search-version
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Custom Fields Search
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7513.82 ▼0.812.01 ▲0.2146.28 ▲3.29
Dashboard /wp-admin2,235 ▲615.19 ▼0.48105.08 ▲12.8043.45 ▲3.69
Posts /wp-admin/edit.php2,129 ▲292.32 ▲0.2938.35 ▼0.7733.65 ▼2.01
Add New Post /wp-admin/post-new.php1,560 ▲3423.96 ▲0.75654.89 ▼24.7934.04 ▼26.99
Media Library /wp-admin/upload.php1,443 ▲434.73 ▲0.56107.59 ▲0.8142.33 ▼2.68

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_wp_custom_fields_search
    • wp_custom_fields_search-version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-custom-fields-search/templates/input-text.php
    • > /wp-content/plugins/wp-custom-fields-search/templates/input-radio-buttons.php
    • > /wp-content/plugins/wp-custom-fields-search/templates/input-checkbox.php
    • > /wp-content/plugins/wp-custom-fields-search/templates/input-select.php
  • 34× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: html_name in wp-content/plugins/wp-custom-fields-search/templates/input-select.php on line 1
    • > PHP Notice
      Undefined variable: html_name in wp-content/plugins/wp-custom-fields-search/templates/input-checkbox.php on line 4
    • > PHP Notice
      Undefined variable: query in wp-content/plugins/wp-custom-fields-search/templates/input-checkbox.php on line 4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-custom-fields-search/templates/input-radio-buttons.php on line 2
    • > PHP Notice
      Undefined variable: html_name in wp-content/plugins/wp-custom-fields-search/templates/input-text.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-custom-fields-search/templates/unsupported-message.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-custom-fields-search/templates/unsupported-message.php:6
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/wp-custom-fields-search/templates/preset-display.php on line 1
    • > PHP Notice
      Undefined variable: html_name in wp-content/plugins/wp-custom-fields-search/templates/input-text.php on line 1
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/wp-custom-fields-search/templates/input-radio-buttons.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === wp-custom-fields-search === )
  • Tested up to: Version not formatted correctly
Please take inspiration from this readme.txt

wp-custom-fields-search/plugin.php 85% from 13 tests

Analyzing the main PHP file in "WP Custom Fields Search" version 1.2.35
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-custom-fields-search.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected11,594 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
CSS30659,039
PHP18136411,433
JavaScript8110400763
HTML9176195
PO File17173154
Sass12010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.73
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity1.99
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods125
▷ Static methods43.20%
▷ Public methods125100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ng/css/icons/open-accordion.png0.69KB0.82KB0.00%
ng/css/icons/drag32.png0.35KB0.28KB▼ 20.78%
ng/css/icons/cog.png0.69KB0.89KB0.00%
ng/css/icons/spanner32.png0.56KB0.32KB▼ 44.12%
ng/css/icons/stop32.png0.60KB0.31KB▼ 48.86%