72% cloud-search

Code Review | CloudSearch

WordPress plugin CloudSearch scored72%from 54 tests.

About plugin

  • Plugin page: cloud-search
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 6.3.1
  • First release: Feb 14, 2016
  • Latest release: Jan 27, 2023
  • Number of updates: 118
  • Update frequency: every 21.5 days
  • Top authors: lando1982 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

70+ active /4,993 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.93MB] [CPU: ▼7.12ms] Passed 4 tests

Server-side resources used by CloudSearch
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.07 ▲1.6042.26 ▲5.21
Dashboard /wp-admin4.92 ▲1.6254.81 ▲6.32
Posts /wp-admin/edit.php5.04 ▲1.6854.21 ▲6.73
Add New Post /wp-admin/post-new.php4.77 ▼1.1244.95 ▼46.75
Media Library /wp-admin/upload.php4.84 ▲1.6242.69 ▲7.79
Documentation /wp-admin/admin.php?page=acs_menu_docs4.8139.88
Import / Export /wp-admin/admin.php?page=acs_menu_import4.8137.48
Settings /wp-admin/admin.php?page=acs_menu_settings4.7936.19
Help /wp-admin/admin.php?page=acs_menu_help4.8138.66
Manage /wp-admin/admin.php?page=acs_menu_manage4.8141.24

Server storage [IO: ▲28.63MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • Filesystem usage must be lower than 25MB (currently using 28.63MB)
Filesystem: 2,513 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
acs_option_settings
theysaidso_admin_options
acs_option_status
can_compress_scripts
acs_option_items
acs_version
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by CloudSearch
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.64 ▼0.741.53 ▼0.2137.80 ▼4.79
Dashboard /wp-admin2,248 ▲574.86 ▼1.04108.19 ▼0.6342.79 ▲1.93
Posts /wp-admin/edit.php2,128 ▲392.01 ▲0.0139.69 ▲1.0336.10 ▲1.42
Add New Post /wp-admin/post-new.php1,564 ▲2223.14 ▲4.82609.92 ▲4.2459.19 ▲4.62
Media Library /wp-admin/upload.php1,427 ▲454.24 ▼0.06101.18 ▲2.1241.22 ▼2.95
Documentation /wp-admin/admin.php?page=acs_menu_docs9302.0423.7732.64
Import / Export /wp-admin/admin.php?page=acs_menu_import1,0732.1724.4834.48
Settings /wp-admin/admin.php?page=acs_menu_settings2,3711.7127.3756.52
Help /wp-admin/admin.php?page=acs_menu_help1,6091.7224.8546.81
Manage /wp-admin/admin.php?page=acs_menu_manage8311.7125.0126.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • acs_version
    • acs_option_settings

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=acs_menu_settings
    • > Notice in wp-content/plugins/cloud-search/admin/cloud-search-admin-settings.php+67
    Undefined property: stdClass::$acs_aws_region
    • > GET request to /wp-admin/admin.php?page=acs_menu_settings
    • > Notice in wp-content/plugins/cloud-search/admin/cloud-search-admin-settings.php+266
    Undefined property: stdClass::$acs_frontpage_content_box_value
    • > GET request to /wp-admin/admin.php?page=acs_menu_settings
    • > Notice in wp-content/plugins/cloud-search/admin/cloud-search-admin-settings.php+380
    Undefined property: stdClass::$acs_results_no_results_box_value

SRP 0% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cloud-search/cloud-search-wp-cli.php
    • > /wp-content/plugins/cloud-search/cloud-search.php
  • 1226× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Cloud_Search\\Aws\\AwsClient' not found in wp-content/plugins/cloud-search/vendor/aws/aws-sdk-php/ChimeSDKMessaging/ChimeSDKMessagingClient.php:101
    • > PHP Fatal error
      Uncaught Error: Interface 'WP_Cloud_Search\\Aws\\Common\\Model\\MultipartUpload\\TransferStateInterface' not found in wp-content/plugins/cloud-search/vendor/aws/Aws/Common/Model/MultipartUpload/AbstractTransferState.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Cloud_Search\\Aws\\Exception\\AwsException' not found in wp-content/plugins/cloud-search/vendor/aws/aws-sdk-php/RedshiftServerless/Exception/RedshiftServerlessException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Cloud_Search\\Aws\\Exception\\AwsException' not found in wp-content/plugins/cloud-search/vendor/aws/aws-sdk-php/ServiceQuotas/Exception/ServiceQuotasException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Cloud_Search\\Aws\\AwsClient' not found in wp-content/plugins/cloud-search/vendor/aws/aws-sdk-php/ManagedGrafana/ManagedGrafanaClient.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Cloud_Search\\Aws\\AwsClient' not found in wp-content/plugins/cloud-search/vendor/aws/aws-sdk-php/CognitoSync/CognitoSyncClient.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Cloud_Search\\Aws\\AwsClient' not found in wp-content/plugins/cloud-search/vendor/aws/aws-sdk-php/CloudTrail/CloudTrailClient.php:68
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Cloud_Search\\Aws\\Exception\\AwsException' not found in wp-content/plugins/cloud-search/vendor/aws/aws-sdk-php/CodeGuruProfiler/Exception/CodeGuruProfilerException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Cloud_Search\\Aws\\AwsClient' not found in wp-content/plugins/cloud-search/vendor/aws/aws-sdk-php/CodeBuild/CodeBuildClient.php:99
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Cloud_Search\\Aws\\Exception\\AwsException' not found in wp-content/plugins/cloud-search/vendor/aws/aws-sdk-php/Translate/Exception/TranslateException.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Settings page), #2 (Manage page), #3 (Front page), #4 (Other settings (results and highlighting)), #5 (Other settings (suggestions))
You can look at the official readme.txt

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

The main PHP script in "CloudSearch" version 3.0.0 is automatically included on every request by WordPress
129 characters long description:
CloudSearch is a flexible plugin that allows you to leverage the search index power of Amazon CloudSearch in your WordPress site.

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
Good job! No executable or dangerous file extensions detected83,579 lines of code in 2,464 files:
LanguageFilesBlank linesComment linesLines of code
PHP2,4145,97164,24866,755
JSON10007,892
Markdown171,55504,897
PO File15621,8952,694
CSS454166731
JavaScript15111205582
YAML11013
make1409
SVG1016

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity5.68
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces750
Interfaces135
Traits28
Classes1,386
▷ Abstract classes493.54%
▷ Concrete classes1,33796.46%
▷ Final classes392.92%
Methods5,370
▷ Static methods65712.23%
▷ Public methods4,04575.33%
▷ Protected methods60411.25%
▷ Private methods72113.43%
Functions609
▷ Named functions16026.27%
▷ Anonymous functions44973.73%
Constants605
▷ Global constants00.00%
▷ Class constants605100.00%
▷ Public constants59498.18%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/dist/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
css/dist/images/arrow_down.png0.17KB0.18KB0.00%
css/images/slider_handles.png4.35KB1.52KB▼ 64.97%
css/images/icon_sprite.png3.14KB2.30KB▼ 26.70%
css/dist/images/icon_sprite.png3.14KB2.30KB▼ 26.70%