84% enhanced-search-form

Code Review | Enhanced Search Form

WordPress plugin Enhanced Search Form scored84%from 54 tests.

About plugin

  • Plugin page: enhanced-search-form
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.0.1
  • WordPress version: 6.3.1
  • First release: Jul 11, 2009
  • Latest release: Dec 3, 2014
  • Number of updates: 13
  • Update frequency: every 151.6 days
  • Top authors: Ono Oogami (76.92%)bestweblayout (30.77%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /14,013 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.73ms] Passed 4 tests

A check of server-side resources used by Enhanced Search Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.54 ▼2.03
Dashboard /wp-admin3.33 ▲0.0350.41 ▼1.65
Posts /wp-admin/edit.php3.38 ▲0.0352.95 ▼0.70
Add New Post /wp-admin/post-new.php5.91 ▲0.0395.64 ▼2.53
Media Library /wp-admin/upload.php3.26 ▲0.0338.13 ▲2.55

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Enhanced Search Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲13714.11 ▼0.276.29 ▲4.0446.16 ▲3.74
Dashboard /wp-admin2,206 ▲154.85 ▼0.01113.61 ▼1.6442.86 ▼1.57
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0740.36 ▼4.0535.25 ▼1.01
Add New Post /wp-admin/post-new.php1,533 ▲523.56 ▲5.44614.95 ▼13.9056.70 ▲0.42
Media Library /wp-admin/upload.php1,388 ▼04.32 ▲0.0899.03 ▼2.1142.42 ▼0.92

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enhanced-search-form/enhanced-search-form.php:167

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 24 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Search Form, the "Advanced" button is added by this plugin), #2 (When clicking "Advanced", visitors can set more search conditions...)
You can look at the official readme.txt

enhanced-search-form/enhanced-search-form.php Passed 13 tests

The main file in "Enhanced Search Form" v. 0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
97 characters long description:
Enhance wordpress search form to allow searching posts in certain category, month archive or tag.

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 plugin171 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12538111
PO File161230
JavaScript11019
CSS12011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.71
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%
Functions5
▷ Named functions5100.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
2 PNG files occupy 0.21MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png87.92KB39.36KB▼ 55.23%
screenshot-2.png123.52KB50.18KB▼ 59.38%