90% rest-api-search

Code Review | REST API Search

WordPress plugin REST API Search scored90%from 54 tests.

About plugin

  • Plugin page: rest-api-search
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2016
  • Latest release: Jun 21, 2016
  • Number of updates: 16
  • Update frequency: every 4.7 days
  • Top authors: KCPT (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,208 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.36MB] [CPU: ▼12.45ms] Passed 4 tests

This is a short check of server-side resources used by REST API Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.12 ▲3.82
Dashboard /wp-admin3.31 ▲0.0153.52 ▼0.94
Posts /wp-admin/edit.php3.36 ▲0.0148.08 ▼4.32
Add New Post /wp-admin/post-new.php4.45 ▼1.4446.60 ▼47.96
Media Library /wp-admin/upload.php3.23 ▲0.0137.92 ▲3.44

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for REST API Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.63 ▼0.802.06 ▼0.0444.38 ▲0.18
Dashboard /wp-admin2,206 ▲185.80 ▼0.05100.48 ▼3.7242.22 ▲3.03
Posts /wp-admin/edit.php2,089 ▲32.05 ▼0.0134.99 ▼5.1433.89 ▼3.05
Add New Post /wp-admin/post-new.php45 ▼1,4750.44 ▼22.600.06 ▼619.459.02 ▼47.53
Media Library /wp-admin/upload.php1,385 ▼64.15 ▼0.01103.63 ▼1.8177.42 ▲30.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

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

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === rest-api-search === )
You can take inspiration from this readme.txt

rest-api-search/rest-api-search.php Passed 13 tests

The primary PHP file in "REST API Search" version 1.4 is used by WordPress to initiate all plugin functionality
85 characters long description:
Adds in the missing search functionality of all post types to the REST API v2 plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin481 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP210130465
Markdown117016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity22.50
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity4.91
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods981.82%
▷ Protected methods218.18%
▷ 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected