10% index-algolia

Code Review | Index on Algolia

WordPress plugin Index on Algolia scored10%from 54 tests.

About plugin

  • Plugin page: index-algolia
  • Plugin version: 1.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 17, 2023
  • Latest release: Apr 17, 2023
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: theurtin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /149 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > User error in wp-content/plugins/index-algolia/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.16.

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.89ms] Passed 4 tests

This is a short check of server-side resources used by Index on Algolia
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.67 ▼38.45
Dashboard /wp-admin2.09 ▼1.225.23 ▼48.12
Posts /wp-admin/edit.php2.09 ▼1.276.11 ▼42.69
Add New Post /wp-admin/post-new.php2.09 ▼3.806.16 ▼90.30
Media Library /wp-admin/upload.php2.09 ▼1.145.92 ▼31.86

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 130 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Index on Algolia
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲10013.70 ▼0.691.84 ▼0.0843.44 ▼0.38
Dashboard /wp-admin2,254 ▲725.89 ▼0.01102.86 ▼3.0166.53 ▲23.85
Posts /wp-admin/edit.php2,135 ▲492.06 ▲0.0439.77 ▲3.7735.08 ▼0.60
Add New Post /wp-admin/post-new.php45 ▼1,4690.44 ▼17.150.06 ▼680.808.45 ▼42.99
Media Library /wp-admin/upload.php1,428 ▲374.16 ▼0.16100.83 ▼3.4068.77 ▲22.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User error in wp-content/plugins/index-algolia/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.16.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
  • 55× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Algolia\\AlgoliaSearch\\Exceptions\\RequestException' not found in wp-content/plugins/index-algolia/vendor/algolia/algoliasearch-client-php/src/Exceptions/BadRequestException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/index-algolia/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/index-algolia/vendor/psr/simple-cache/src/CacheInterface.php on line 34
    • > PHP Fatal error
      Uncaught Error: Class 'Algolia\\AlgoliaSearch\\Config\\AbstractConfig' not found in wp-content/plugins/index-algolia/vendor/algolia/algoliasearch-client-php/src/Config/AnalyticsConfig.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Algolia\\AlgoliaSearch\\Response\\AbstractResponse' not found in wp-content/plugins/index-algolia/vendor/algolia/algoliasearch-client-php/src/Response/MultiResponse.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Algolia\\AlgoliaSearch\\Response\\AbstractResponse' not found in wp-content/plugins/index-algolia/vendor/algolia/algoliasearch-client-php/src/Response/RestoreApiKeyResponse.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Algolia\\AlgoliaSearch\\Config\\AbstractConfig' not found in wp-content/plugins/index-algolia/vendor/algolia/algoliasearch-client-php/src/Config/SearchConfig.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/index-algolia/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/index-algolia/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Algolia\\AlgoliaSearch\\Response\\AbstractResponse' not found in wp-content/plugins/index-algolia/vendor/algolia/algoliasearch-client-php/src/Response/NullResponse.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
There were not plugin tags detected

index-algolia/index-algolia.php Passed 13 tests

The primary PHP file in "Index on Algolia" version 1.0 is used by WordPress to initiate all plugin functionality
43 characters long description:
Allow to index Wordpress content in Algolia

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Almost there! Just fix the following issues
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/index-algolia/vendor/bin/algolia-doctor.bat
6,876 lines of code in 122 files:
LanguageFilesBlank linesComment linesLines of code
PHP1081,7223,8536,242
JSON500391
YAML11814124
Markdown6370102
Dockerfile14212
DOS Batch1005

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.55
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces19
Interfaces14
Traits2
Classes76
▷ Abstract classes45.26%
▷ Concrete classes7294.74%
▷ Final classes4765.28%
Methods659
▷ Static methods9314.11%
▷ Public methods59890.74%
▷ Protected methods111.67%
▷ Private methods507.59%
Functions23
▷ Named functions521.74%
▷ Anonymous functions1878.26%
Constants16
▷ Global constants212.50%
▷ Class constants1487.50%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin