73% search-with-azure

Code Review | Search with Azure

WordPress plugin Search with Azure scored73%from 54 tests.

About plugin

  • Plugin page: search-with-azure
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.3
  • WordPress version: 6.3.1
  • First release: Sep 22, 2015
  • Latest release: Sep 24, 2015
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: neilb27 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,320 total downloads

Benchmarks

Plugin footprint 83% 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.24MB] [CPU: ▼0.40ms] Passed 4 tests

A check of server-side resources used by Search with Azure
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2539.37 ▼1.04
Dashboard /wp-admin3.57 ▲0.2748.70 ▲2.74
Posts /wp-admin/edit.php3.62 ▲0.2750.98 ▲4.70
Add New Post /wp-admin/post-new.php6.11 ▲0.2283.51 ▼7.98
Media Library /wp-admin/upload.php3.43 ▲0.2038.18 ▲7.66
Search with Azure /wp-admin/options-general.php?page=azure-search-setting-admin3.3735.20

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_azure_search_box_widget
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Search with Azure: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲17014.34 ▲0.057.32 ▲5.5238.73 ▼2.86
Dashboard /wp-admin2,217 ▲294.90 ▲0.02111.85 ▲8.0340.86 ▼3.97
Posts /wp-admin/edit.php2,097 ▲82.03 ▲0.0037.81 ▼1.9332.93 ▼2.07
Add New Post /wp-admin/post-new.php1,524 ▼1017.75 ▼5.24661.71 ▼11.1368.15 ▲10.18
Media Library /wp-admin/upload.php1,399 ▲114.17 ▼0.0296.39 ▲1.5743.57 ▲2.16
Search with Azure /wp-admin/options-general.php?page=azure-search-setting-admin8432.0423.8826.71

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=azure-search-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=azure-search-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/search-with-azure/admin/partials/azure-search-admin-display.php
    • > /wp-content/plugins/search-with-azure/public/partials/azure-search-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/search-with-azure/widgets/azure-search-box-widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === search-with-azure === )
The official readme.txt is a good inspiration

search-with-azure/search-with-azure.php Passed 13 tests

The main file in "Search with Azure" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
113 characters long description:
Use the power of the Microsoft Cloud to reduce load on your server and have a faster and more intelligent search.

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
Success! There were no dangerous files found in this plugin7,131 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript78184156,144
PHP16275547899
CSS315788

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.85
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods80
▷ Static methods78.75%
▷ Public methods6783.75%
▷ Protected methods00.00%
▷ Private methods1316.25%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.42MB with 0.26MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png155.87KB50.60KB▼ 67.54%
assets/screenshot-3.png164.54KB63.24KB▼ 61.56%
assets/screenshot-1.png108.13KB42.94KB▼ 60.29%