78% smart-search

Code Review | Smart Search Engine

WordPress plugin Smart Search Engine scored78%from 54 tests.

About plugin

  • Plugin page: smart-search
  • Plugin version: 0.9.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.9.2
  • WordPress version: 6.3.1
  • First release: Apr 29, 2014
  • Latest release: Aug 27, 2014
  • Number of updates: 36
  • Update frequency: every 3.4 days
  • Top authors: Contesio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,047 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼4.56ms] Passed 4 tests

Server-side resources used by Smart Search Engine
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1144.30 ▲5.78
Dashboard /wp-admin3.41 ▲0.1153.01 ▲3.70
Posts /wp-admin/edit.php3.53 ▲0.1751.08 ▼0.90
Add New Post /wp-admin/post-new.php5.99 ▲0.1187.00 ▼26.07
Media Library /wp-admin/upload.php3.33 ▲0.1041.00 ▲5.03
Smart Search Engine /wp-admin/plugins.php?page=smart-search3.4736.33

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Smart Search Engine: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.051.99 ▼0.3343.45 ▲0.24
Dashboard /wp-admin2,199 ▲195.54 ▼0.0986.31 ▼5.0540.16 ▼1.69
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0440.46 ▼17.5834.56 ▼18.41
Add New Post /wp-admin/post-new.php1,531 ▼423.13 ▲4.80672.18 ▲45.2056.29 ▼8.30
Media Library /wp-admin/upload.php1,404 ▲14.19 ▼0.03107.70 ▲2.6045.95 ▼2.14
Smart Search Engine /wp-admin/plugins.php?page=smart-search1,5322.86108.7646.30

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/smart-search/views/public.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/smart-search/views/admin.php:12
    • > PHP Warning
      require_once(ROUTERS_PATH/searchRouter.abst.php): failed to open stream: No such file or directory in wp-content/plugins/smart-search/classes/routers/bingSearchRouter.class.php on line 3
    • > PHP Warning
      Use of undefined constant ROUTERS_PATH - assumed 'ROUTERS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/smart-search/classes/routers/bingSearchRouter.class.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ROUTERS_PATH/searchRouter.abst.php' (include_path='.:/usr/share/php') in wp-content/plugins/smart-search/classes/routers/bingSearchRouter.class.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/smart-search/inc/const.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: search, archives

smart-search/smart-search.php 92% from 13 tests

"Smart Search Engine" version 0.9.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,203 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP11196330901
PO File286116236
JavaScript511866
CSS2020

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.25
Average class complexity28.00
▷ Minimum class complexity23.00
▷ Maximum class complexity32.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods53
▷ Static methods35.66%
▷ Public methods3260.38%
▷ Protected methods1833.96%
▷ Private methods35.66%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin