84% search-with-algolia-instantsearch-blocks

Code Review | Search with Algolia Instantsearch Blocks

WordPress plugin Search with Algolia Instantsearch Blocks scored 84% from 54 tests.

About plugin

  • Plugin page: search-with-algol...
  • Plugin version: 0.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 3, 2020
  • Latest release: Nov 19, 2021
  • Number of updates: 4
  • Update frequency: every 87.8 days
  • Top authors: megumithemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 883 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.23MB] [CPU: ▼13.46ms] Passed 4 tests

Server-side resources used by Search with Algolia Instantsearch Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.33 ▲1.95
Dashboard /wp-admin3.35 ▲0.0443.83 ▼6.83
Posts /wp-admin/edit.php3.40 ▲0.0447.96 ▼0.10
Add New Post /wp-admin/post-new.php4.86 ▼1.0252.88 ▼48.85
Media Library /wp-admin/upload.php3.27 ▲0.0440.22 ▲6.58

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Search with Algolia Instantsearch Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲10415.62 ▲1.2523.03 ▲21.0043.21 ▼2.56
Dashboard /wp-admin2,203 ▲185.99 ▲1.1097.68 ▼3.6336.90 ▼9.35
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0237.14 ▼0.1033.21 ▼2.51
Add New Post /wp-admin/post-new.php6,585 ▲5,07122.58 ▲4.98911.86 ▲279.5138.75 ▼17.42
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0195.56 ▼2.4442.64 ▼2.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/search-with-algolia-instantsearch-blocks/algolia-instantsearch-blocks.php:16

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: algolia, instantsearch, block

search-with-algolia-instantsearch-blocks/algolia-instantsearch-blocks.php 92% from 13 tests

The principal PHP file in "Search with Algolia Instantsearch Blocks" v. 0.2.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("search-with-algolia-instantsearch-blocks.php" instead of "algolia-instantsearch-blocks.php")

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
Everything looks great! No dangerous files found in this plugin21,156 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JSON40019,625
TypeScript24861011,295
PHP41613158
JavaScript31536
Markdown111032
Bourne Shell1108
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin