84% enhanced-search

Code Review | Enhanced Search

WordPress plugin Enhanced Search scored84%from 54 tests.

About plugin

  • Plugin page: enhanced-search
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-5.3
  • WordPress version: 6.3.1
  • First release: Nov 23, 2019
  • Latest release: Nov 28, 2019
  • Number of updates: 10
  • Update frequency: every 0.5 days
  • Top authors: simonebaldini (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /544 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.47MB] [CPU: ▼2.32ms] Passed 4 tests

An overview of server-side resources used by Enhanced Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4844.55 ▲1.12
Dashboard /wp-admin3.77 ▲0.4752.40 ▼0.75
Posts /wp-admin/edit.php3.82 ▲0.4753.16 ▼2.07
Add New Post /wp-admin/post-new.php6.35 ▲0.47100.68 ▼5.47
Media Library /wp-admin/upload.php3.69 ▲0.4737.55 ▼1.00
Enhanced Search /wp-admin/tools.php?page=enhanced_search3.7043.78

Server storage [IO: ▲0.79MB] [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: 124 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
enanched_search_activation_timestamp
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Enhanced Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲7514.74 ▼0.012.04 ▲0.2642.49 ▼1.39
Dashboard /wp-admin2,227 ▲395.85 ▲0.96107.56 ▲5.3042.35 ▼1.03
Posts /wp-admin/edit.php2,112 ▲232.01 ▼0.0340.82 ▼1.6835.66 ▼4.53
Add New Post /wp-admin/post-new.php1,557 ▲3823.25 ▲0.05694.66 ▲12.0551.06 ▼8.87
Media Library /wp-admin/upload.php1,406 ▲184.25 ▼0.00111.66 ▲4.6644.91 ▲0.41
Enhanced Search /wp-admin/tools.php?page=enhanced_search1,6072.2247.4939.11

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

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 | 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
  • 74× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'ZendSearch\\Lucene\\SearchIndexInterface' not found in wp-content/plugins/enhanced-search/library/ZendSearch/Lucene/Index.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ZendSearch\\Lucene\\AbstractPriorityQueue' not found in wp-content/plugins/enhanced-search/library/ZendSearch/Lucene/Index/TermsPriorityQueue.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ZendSearch\\Lucene\\Analysis\\Analyzer\\Common\\AbstractCommon' not found in wp-content/plugins/enhanced-search/library/ZendSearch/Lucene/Analysis/Analyzer/Common/Utf8.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'ZendSearch\\Lucene\\Storage\\File\\FileInterface' not found in wp-content/plugins/enhanced-search/library/ZendSearch/Lucene/Storage/File/AbstractFile.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'ZendSearch\\Lucene\\Index\\TermsStreamInterface' not found in wp-content/plugins/enhanced-search/library/ZendSearch/Lucene/TermStreamsPriorityQueue.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'ZendSearch\\Lucene\\Search\\Query\\AbstractQuery' not found in wp-content/plugins/enhanced-search/library/ZendSearch/Lucene/Search/Query/Preprocessing/AbstractPreprocessing.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'ZendSearch\\Lucene\\Exception\\ExceptionInterface' not found in wp-content/plugins/enhanced-search/library/ZendSearch/Lucene/Exception/RuntimeException.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ZendSearch\\Lucene\\Search\\Similarity\\AbstractSimilarity' not found in wp-content/plugins/enhanced-search/library/ZendSearch/Lucene/Search/Similarity/DefaultSimilarity.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ZendSearch\\Lucene\\Storage\\File\\AbstractFile' not found in wp-content/plugins/enhanced-search/library/ZendSearch/Lucene/Storage/File/Memory.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ZendSearch\\Lucene\\Analysis\\Analyzer\\Common\\TextNum' not found in wp-content/plugins/enhanced-search/library/ZendSearch/Lucene/Analysis/Analyzer/Common/TextNum/CaseInsensitive.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: fine, lucene, fast, tuning, fuzzy...

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

The main PHP file in "Enhanced Search" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
90 characters long description:
WordPress plugin that improves basic search givin you the possibility to do a fine tuning.

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
Everything looks great! No dangerous files found in this plugin11,082 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
PHP1133,0679,13210,642
CSS24114361
JavaScript29379

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.72
▷ Minimum class complexity1.00
▷ Maximum class complexity233.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces25
Interfaces11
Traits0
Classes98
▷ Abstract classes1313.27%
▷ Concrete classes8586.73%
▷ Final classes00.00%
Methods734
▷ Static methods689.26%
▷ Public methods65489.10%
▷ Protected methods334.50%
▷ Private methods476.40%
Functions10
▷ Named functions330.00%
▷ Anonymous functions770.00%
Constants107
▷ Global constants10.93%
▷ Class constants10699.07%
▷ Public constants106100.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