84% disable-search

Code Review | Disable Search

WordPress plugin Disable Search scored84%from 54 tests.

About plugin

  • Plugin page: disable-search
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jun 11, 2009
  • Latest release: Sep 3, 2023
  • Number of updates: 25
  • Update frequency: every 208.4 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

40,000+ active /280,941 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.01MB] [CPU: ▼0.42ms] Passed 4 tests

Server-side resources used by Disable Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.40 ▲1.21
Dashboard /wp-admin3.32 ▲0.0246.90 ▼1.31
Posts /wp-admin/edit.php3.37 ▲0.0147.26 ▼3.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.54 ▲1.67
Media Library /wp-admin/upload.php3.24 ▲0.0139.07 ▲2.96

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Disable Search: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,773 ▲3813.22 ▼1.181.81 ▲0.1325.62 ▼22.98
Dashboard /wp-admin2,206 ▲154.85 ▼0.2096.85 ▼6.7938.83 ▼6.81
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0342.89 ▲7.9236.47 ▲1.97
Add New Post /wp-admin/post-new.php1,539 ▲2518.41 ▲0.90614.71 ▼76.5472.44 ▲17.69
Media Library /wp-admin/upload.php1,388 ▲64.26 ▲0.0896.62 ▼6.5941.48 ▼1.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/disable-search/tests/phpunit/bootstrap.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: search, disable, coffee2code

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

Analyzing the main PHP file in "Disable Search" version 2.0.1
64 characters long description:
Disable the built-in front-end search capabilities of WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin533 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP4107165286
Markdown3460204
Bourne Shell16221
XML10014
JSON1005
JavaScript1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity9.00
▷ Minimum class complexity6.00
▷ Maximum class complexity12.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods823.53%
▷ Public methods3294.12%
▷ Protected methods00.00%
▷ Private methods25.88%
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

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