84% spotlight-search

Code Review | Spotlight Search - Search Assistant Plugin for WordPress

WordPress plugin Spotlight Search - Search Assistant Plugin for WordPress scored 84% from 54 tests.

About plugin

  • Plugin page: spotlight-search
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2022
  • Latest release: Nov 5, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: spiderdevs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 224 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼4.38ms] Passed 4 tests

Server-side resources used by Spotlight Search - Search Assistant Plugin for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1944.42 ▲2.45
Dashboard /wp-admin3.49 ▲0.1849.47 ▼0.70
Posts /wp-admin/edit.php3.60 ▲0.2545.76 ▼1.31
Add New Post /wp-admin/post-new.php6.09 ▲0.2085.24 ▼17.96
Media Library /wp-admin/upload.php3.41 ▲0.1838.41 ▲3.00
Codestar Framework /wp-admin/tools.php?page=csf-welcome3.4741.33
Spotlight Search /wp-admin/options-general.php?page=spotlight-search3.4136.44

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 144 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
widget_recent-posts
spotlight_search_version
widget_theysaidso_widget
spotlight_search_opt
widget_spotlight_search_widget
spotlight_search_installed
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Spotlight Search - Search Assistant Plugin for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,171 ▲43613.70 ▼0.827.90 ▲6.2142.84 ▼1.89
Dashboard /wp-admin2,269 ▲844.85 ▼0.04112.43 ▲11.6142.44 ▼8.31
Posts /wp-admin/edit.php2,149 ▲602.05 ▼0.1335.16 ▼6.5233.83 ▼1.10
Add New Post /wp-admin/post-new.php1,565 ▲4623.25 ▲0.04652.46 ▲49.6652.09 ▲1.46
Media Library /wp-admin/upload.php1,448 ▲574.22 ▼0.02103.70 ▲6.4648.26 ▲3.81
Codestar Framework /wp-admin/tools.php?page=csf-welcome1,4733.6855.0963.00
Spotlight Search /wp-admin/options-general.php?page=spotlight-search1,1663.6051.5734.77

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
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_spotlight_search_widget
    • widget_theysaidso_widget
    • spotlight_search_opt
    • theysaidso_admin_options
    • widget_recent-comments
    • spotlight_search_version
    • spotlight_search_installed
    • widget_recent-posts
    • 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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'CSF' not found in wp-content/plugins/spotlight-search/classes/admin/settings/options/opt-search.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CSF' not found in wp-content/plugins/spotlight-search/classes/admin/settings/options/opt-contact.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spotlight-search/includes/spotlight_widget.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 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
8 plugin tags: helper, search, ajax, contact, email...

spotlight-search/spotlight-search.php 85% from 13 tests

The main PHP script in "Spotlight Search - Search Assistant Plugin for WordPress" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "5.2")
  • Description: Keep the plugin description shorter than 140 characters (currently 218 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected17,831 lines of code in 119 files:
LanguageFilesBlank linesComment linesLines of code
PHP812,2721,09110,087
PO File203,1983,5916,500
CSS48613565
Markdown2850379
JavaScript7388281
SVG50019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity18.22
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity6.14
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes63
▷ Abstract classes23.17%
▷ Concrete classes6196.83%
▷ Final classes11.64%
Methods211
▷ Static methods3315.64%
▷ Public methods21099.53%
▷ Protected methods00.00%
▷ Private methods10.47%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
assets/img/search.png1.02KB0.54KB▼ 46.85%