68% search-cloud-one

Code Review | Search Cloud One

WordPress plugin Search Cloud One scored68%from 54 tests.

About plugin

  • Plugin page: search-cloud-one
  • Plugin version: 2.2.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.1.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2018
  • Latest release: Apr 4, 2019
  • Number of updates: 41
  • Update frequency: every 5.1 days
  • Top authors: electronart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /919 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.67MB] [CPU: ▼18.92ms] Passed 4 tests

Server-side resources used by Search Cloud One
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0232.98 ▼11.12
Dashboard /wp-admin3.33 ▲0.0244.45 ▼1.77
Posts /wp-admin/edit.php3.38 ▲0.0244.94 ▼3.32
Add New Post /wp-admin/post-new.php3.14 ▼2.7532.14 ▼59.45
Media Library /wp-admin/upload.php3.25 ▲0.0236.81 ▲4.64
Categories /wp-admin/admin.php?page=SearchCloudOne/Categories.php3.2430.25
New Shortcode /wp-admin/admin.php?page=SearchCloudOne/NewShortcode.php3.1928.29
Quick Start /wp-admin/admin.php?page=SearchCloudOne/Quickstart.php3.1931.96
Shortcodes /wp-admin/admin.php?page=SearchCloudOne/Shortcodes.php3.1927.78
New Category /wp-admin/admin.php?page=SearchCloudOne/NewCategory.php3.1929.33

Server storage [IO: ▲0.31MB] [DB: ▲0.08MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 44 new files
Database: 6 new tables, 6 new options
New tables
wp_sc1categories
wp_sc1searchpages
wp_sc1categoryindexes
wp_sc1categoryfacets
wp_sc1searchpagecategories
wp_sc1debugsettings
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Search Cloud One: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,985 ▲22813.61 ▼0.774.86 ▲2.7241.06 ▼4.55
Dashboard /wp-admin2,266 ▲784.87 ▼0.01108.32 ▼5.5638.64 ▼0.07
Posts /wp-admin/edit.php2,149 ▲602.06 ▲0.0641.09 ▼0.7935.00 ▼0.06
Add New Post /wp-admin/post-new.php1,546 ▲1023.21 ▲0.13577.34 ▼67.5456.37 ▼0.91
Media Library /wp-admin/upload.php1,446 ▲554.16 ▼0.0493.17 ▼3.6342.01 ▼1.39
Categories /wp-admin/admin.php?page=SearchCloudOne/Categories.php7401.148.2120.87
New Shortcode /wp-admin/admin.php?page=SearchCloudOne/NewShortcode.php7401.536.4121.88
Quick Start /wp-admin/admin.php?page=SearchCloudOne/Quickstart.php7401.146.6520.28
Shortcodes /wp-admin/admin.php?page=SearchCloudOne/Shortcodes.php7401.536.3623.57
New Category /wp-admin/admin.php?page=SearchCloudOne/NewCategory.php7401.146.4624.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 tables in the database
    • wp_sc1categoryfacets
    • wp_sc1categories
    • wp_sc1searchpages
    • wp_sc1searchpagecategories
    • wp_sc1debugsettings
    • wp_sc1categoryindexes
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/search-cloud-one/public/partials/sc1-search-public-display.php
  • 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-cloud-one/public/hitViewer_styler.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rest_url() in wp-content/plugins/search-cloud-one/public/js/file-download.js.php:10

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: search, documents

search-cloud-one/sc1-search.php 85% from 13 tests

Analyzing the main PHP file in "Search Cloud One" version 2.2.5
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("search-cloud-one.php" instead of "sc1-search.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; 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
Success! There were no dangerous files found in this plugin3,749 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP244258003,211
CSS41036443
JavaScript5266195

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions36
▷ Named functions3597.22%
▷ Anonymous functions12.78%
Constants1
▷ Global constants1100.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
5 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/filters-display.png6.40KB3.90KB▼ 39.07%
admin/img/rendered-page.png10.83KB6.16KB▼ 43.11%
admin/img/category-dropdown.png3.95KB2.76KB▼ 30.23%
admin/img/facets-list.png41.27KB9.00KB▼ 78.20%
admin/img/pasting-shortcode.png12.85KB6.92KB▼ 46.18%