10% search-refinement

Code Review | Search Refinement

WordPress plugin Search Refinement scored10%from 54 tests.

About plugin

  • Plugin page: search-refinement
  • Plugin version: 0.9.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 28, 2013
  • Latest release: May 1, 2013
  • Number of updates: 4
  • Update frequency: every 9.0 days
  • Top authors: yorozu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,026 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/search-refinement/modules/widget.php+6
    Function create_function() is deprecated

Server metrics [RAM: ▼1.71MB] [CPU: ▼57.82ms] Passed 4 tests

An overview of server-side resources used by Search Refinement
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.176.02 ▼36.55
Dashboard /wp-admin2.31 ▼1.037.16 ▼57.80
Posts /wp-admin/edit.php2.31 ▼1.046.83 ▼44.62
Add New Post /wp-admin/post-new.php2.31 ▼3.577.72 ▼92.32
Media Library /wp-admin/upload.php2.31 ▼0.928.53 ▼30.05

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_searef_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Search Refinement: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.61 ▲0.231.88 ▲0.1144.99 ▼0.06
Dashboard /wp-admin2,208 ▲175.84 ▼0.0498.30 ▼9.1438.34 ▼2.53
Posts /wp-admin/edit.php2,095 ▲62.08 ▲0.0234.81 ▼2.2936.29 ▼0.75
Add New Post /wp-admin/post-new.php1,534 ▲2023.44 ▲5.78708.45 ▲15.3351.51 ▼3.29
Media Library /wp-admin/upload.php1,393 ▲54.24 ▲0.0596.50 ▼13.0446.86 ▼2.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/search-refinement/modules/widget.php+6
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_searef_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/search-refinement/search-refinement.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/search-refinement/modules/widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

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

"Search Refinement" version 0.9.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
81 characters long description:
カスタムフィールドの値で投稿を絞り込むためのプラグイン

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 detected877 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP38526845
PO File14020
JavaScript10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity50.67
▷ Minimum class complexity9.00
▷ Maximum class complexity101.00
Average method complexity4.72
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin