84% search-exclude

Code Review | Search Exclude

WordPress plugin Search Exclude scored84%from 54 tests.

About plugin

  • Plugin page: search-exclude
  • Plugin version: 2.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Dec 6, 2012
  • Latest release: Nov 13, 2023
  • Number of updates: 67
  • Update frequency: every 59.6 days
  • Top authors: pronskiy (82.09%)quadlayers (19.4%)

Code review

54 tests

User reviews

75 reviews

Install metrics

60,000+ active /702,576 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.42MB] [CPU: ▼2.27ms] Passed 4 tests

Analyzing server-side resources used by Search Exclude
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4440.59 ▼2.61
Dashboard /wp-admin3.80 ▲0.5050.33 ▲4.27
Posts /wp-admin/edit.php3.82 ▲0.4650.73 ▲1.82
Add New Post /wp-admin/post-new.php6.28 ▲0.3984.82 ▼12.57
Media Library /wp-admin/upload.php3.62 ▲0.3939.82 ▲4.69
Search Exclude /wp-admin/options-general.php?page=search_exclude3.6438.59

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Search Exclude
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲10714.70 ▲0.381.54 ▼0.3637.51 ▼4.32
Dashboard /wp-admin2,296 ▲1195.65 ▼0.0790.27 ▼1.8140.15 ▼2.60
Posts /wp-admin/edit.php2,159 ▲591.97 ▼0.0340.10 ▲1.7835.17 ▲1.56
Add New Post /wp-admin/post-new.php6,233 ▲4,70418.94 ▼3.99942.06 ▲345.9257.69 ▲6.57
Media Library /wp-admin/upload.php1,406 ▲34.20 ▲0.04115.14 ▲16.1747.64 ▲3.32
Search Exclude /wp-admin/options-general.php?page=search_exclude7682.1226.0326.49

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • sep_exclude
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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 | 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
The following issues need your attention
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Trait 'QuadLayers\\WP_Notice_Plugin_Promote\\Traits\\PluginDataByFile' not found in wp-content/plugins/search-exclude/jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/PluginByFile.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installer\\LibraryInstaller' not found in wp-content/plugins/search-exclude/vendor/automattic/jetpack-composer-plugin/src/class-manager.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/search-exclude/lib/views/options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/search-exclude/jetpack_vendor/quadlayers/wp-plugin-suggestions/src/view/suggestions.php:21
    • > PHP Fatal error
      Trait 'QuadLayers\\WP_Notice_Plugin_Promote\\Traits\\PluginActions' not found in wp-content/plugins/search-exclude/jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/PluginBySlug.php on line 20
    • > PHP Notice
      Undefined variable: exclude in wp-content/plugins/search-exclude/lib/views/metabox.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function QuadLayers\\SearchExclude\\load_plugin_textdomain() in wp-content/plugins/search-exclude/lib/class-plugin.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Plugin\\PluginInterface' not found in wp-content/plugins/search-exclude/vendor/automattic/jetpack-composer-plugin/src/class-plugin.php:24
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-plugin-install-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/search-exclude/jetpack_vendor/quadlayers/wp-plugin-suggestions/src/Table.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/search-exclude/lib/views/column-cell.php:1

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: search, plugin, search exclude, admin

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

The main file in "Search Exclude" v. 2.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
85 characters long description:
Hide any page or post from the WordPress search results by checking off the checkbox.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected4,050 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
PHP475671,7772,806
Markdown122700730
JSON100458
JavaScript391455
CSS1001

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.41
Average class complexity15.21
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces12
Interfaces0
Traits3
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes14.76%
Methods169
▷ Static methods4928.99%
▷ Public methods13781.07%
▷ Protected methods52.96%
▷ Private methods2715.98%
Functions16
▷ Named functions00.00%
▷ Anonymous functions16100.00%
Constants31
▷ Global constants31100.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
There are no PNG files in this plugin