84% flatsite-serverless-search

Code Review | FLATsite Serverless Search

WordPress plugin FLATsite Serverless Search scored 84% from 54 tests.

About plugin

  • Plugin page: flatsite-serverle...
  • Plugin version: 1.1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 5.9.2
  • First release: Oct 5, 2020
  • Latest release: Mar 17, 2021
  • Number of updates: 13
  • Update frequency: every 12.9 days
  • Top authors: flatsite (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active / 618 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼290.87ms] Passed 4 tests

A check of server-side resources used by FLATsite Serverless Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0559.14 ▲4.33
Dashboard /wp-admin3.45 ▲0.0537.71 ▲0.77
Posts /wp-admin/edit.php3.68 ▲0.0438.60 ▼4.96
Add New Post /wp-admin/post-new.php6.92 ▼0.0596.68 ▼1,159.33
Media Library /wp-admin/upload.php3.33 ▲0.0432.09 ▲0.04
Serverless Search /wp-admin/options-general.php?page=flatsite-sls-settings3.3029.81

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • The plugin illegally modified 1 file (1.20KB) outside of "wp-content/plugins/flatsite-serverless-search/" and "wp-content/uploads/"
    • (new file) wp-content/search-index.json
Filesystem: 9 new files
Database: no new tables, 1 new option
New WordPress options
widget_sls_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for FLATsite Serverless Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,841 ▲11915.76 ▲0.147.06 ▲1.492.44 ▼0.19
Dashboard /wp-admin2,879 ▲286.16 ▼0.09117.06 ▼20.94155.91 ▼5.73
Posts /wp-admin/edit.php2,690 ▼13.23 ▼0.0163.77 ▲1.01148.39 ▲4.89
Add New Post /wp-admin/post-new.php1,755 ▲8720.89 ▲2.66427.00 ▲20.60150.98 ▼6.43
Media Library /wp-admin/upload.php1,703 ▲55.59 ▲0.10154.73 ▲8.31296.92 ▲107.77
Serverless Search /wp-admin/options-general.php?page=flatsite-sls-settings1,0002.4162.79141.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_sls_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/flatsite-serverless-search/resources/views/modal.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/flatsite-serverless-search/src/FLATsiteSearchWidget.php:3
    • > PHP Notice
      Undefined variable: indexUrl in wp-content/plugins/flatsite-serverless-search/resources/views/modal.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/flatsite-serverless-search/src/FLATsiteSearchWidget.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: serverless, flatsite, search

flatsite-serverless-search/flatsite-serverless-search.php 92% from 13 tests

The primary PHP file in "FLATsite Serverless Search" version 1.1.5 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected318 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP55477316
CSS1001
JavaScript1011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.67
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2496.00%
▷ Protected methods14.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
No PNG files were detected