84% rest-api-for-relevanssi

Code Review | REST API for Relevanssi

WordPress plugin REST API for Relevanssi scored84%from 54 tests.

About plugin

  • Plugin page: rest-api-for-rele...
  • Plugin version: 1.18
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Sep 12, 2018
  • Latest release: May 15, 2023
  • Number of updates: 32
  • Update frequency: every 53.5 days
  • Top authors: dzysyak (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /5,065 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by REST API for Relevanssi
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0048.10 ▲4.85
Dashboard /wp-admin3.35 ▼0.0454.57 ▼21.32
Posts /wp-admin/edit.php3.40 ▲0.0048.24 ▼1.53
Add New Post /wp-admin/post-new.php5.93 ▲0.0089.12 ▼5.48
Media Library /wp-admin/upload.php3.27 ▲0.0038.47 ▲5.45

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: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for REST API for Relevanssi
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.38 ▲0.021.68 ▼0.1343.47 ▼0.21
Dashboard /wp-admin2,195 ▲185.57 ▼0.0986.50 ▼2.0138.70 ▲0.71
Posts /wp-admin/edit.php2,079 ▼241.99 ▲0.0135.95 ▼0.8232.22 ▼4.81
Add New Post /wp-admin/post-new.php1,535 ▲725.04 ▲1.87662.75 ▼23.1472.67 ▲10.40
Media Library /wp-admin/upload.php1,400 ▼34.19 ▲0.0197.08 ▼4.7344.56 ▼2.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/rest-api-for-relevanssi/rest-api-for-relevanssi.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: api, search, relevanssi, rest api

rest-api-for-relevanssi/rest-api-for-relevanssi.php Passed 13 tests

The entry point to "REST API for Relevanssi" version 1.18 is a PHP file that has certain tags in its header comment area
45 characters long description:
Adds REST API Endpoint for Relevanssi queries

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin141 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14169141

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code1.02
Average class complexity61.00
▷ Minimum class complexity61.00
▷ Maximum class complexity61.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 are no PNG files in this plugin