88% search-wpml-algolia

Code Review | Search Support For WPML with Algolia

WordPress plugin Search Support For WPML with Algolia scored 88% from 54 tests.

About plugin

  • Plugin page: search-wpml-algolia
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 5.8.1
  • First release: Nov 10, 2021
  • Latest release: Nov 11, 2021
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: kancijan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 35 total downloads

Benchmarks

Plugin footprint Passed 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼172.44ms] Passed 4 tests

Analyzing server-side resources used by Search Support For WPML with Algolia
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0233.96 ▼6.44
Dashboard /wp-admin3.08 ▲0.0248.18 ▲7.27
Posts /wp-admin/edit.php3.13 ▲0.0244.47 ▲1.89
Add New Post /wp-admin/post-new.php5.43 ▼0.0088.69 ▼683.14
Media Library /wp-admin/upload.php3.02 ▲0.0233.81 ▼2.08

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Search Support For WPML with Algolia
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13116.18 ▲0.638.92 ▲0.1950.99 ▲4.47
Dashboard /wp-admin2,970 ▲335.90 ▼0.24144.99 ▼6.42116.40 ▲7.16
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0165.27 ▼2.0088.87 ▲1.24
Add New Post /wp-admin/post-new.php1,500 ▼2,18718.49 ▲3.40378.05 ▼119.30107.71 ▼3.98
Media Library /wp-admin/upload.php1,807 ▼35.04 ▼0.01155.44 ▲13.55115.02 ▲2.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/search-wpml-algolia/templates/autocomplete.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/search-wpml-algolia/templates/instantsearch.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/search-wpml-algolia/search-wpml-algolia.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/search-wpml-algolia/templates/autocomplete.php:91

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: wpml, search, language, algolia

search-wpml-algolia/search-wpml-algolia.php 92% from 13 tests

The primary PHP file in "Search Support For WPML with Algolia" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin381 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36791381

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin