78% simsage-search

Code Review | SimSage Search Plugin

WordPress plugin SimSage Search Plugin scored 78% from 54 tests.

About plugin

  • Plugin page: simsage-search
  • Plugin version: 2.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Nov 6, 2020
  • Latest release: Apr 22, 2022
  • Number of updates: 46
  • Update frequency: every 11.7 days
  • Top authors: rock3125 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 711 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.03MB] [CPU: ▼2.02ms] Passed 4 tests

This is a short check of server-side resources used by SimSage Search Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.73 ▼4.66
Dashboard /wp-admin3.33 ▲0.0343.17 ▼1.51
Posts /wp-admin/edit.php3.38 ▲0.0346.92 ▼1.77
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.02 ▼0.15
Media Library /wp-admin/upload.php3.26 ▲0.0340.17 ▲8.28

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SimSage Search Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲17013.29 ▼1.095.34 ▲3.6042.15 ▼9.89
Dashboard /wp-admin2,309 ▲1245.91 ▲0.04107.35 ▲5.8341.24 ▼3.17
Posts /wp-admin/edit.php2,195 ▲1062.02 ▲0.0239.32 ▲2.4933.39 ▼3.55
Add New Post /wp-admin/post-new.php6,445 ▲4,92223.42 ▲0.36866.10 ▲203.3767.55 ▲16.32
Media Library /wp-admin/upload.php1,489 ▲1044.24 ▲0.0497.68 ▼0.2541.55 ▼3.06

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

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

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simsage-search/inc/simsage_search_static_view.php
  • 37× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/simsage-search/inc/simsage_search_static_view.php on line 6
    • > PHP Warning
      Use of undefined constant SIMSAGE_PLUGIN_DIR - assumed 'SIMSAGE_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/simsage-search/simsage_search.php on line 4
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/simsage-search/inc/simsage_search_static_view.php on line 40
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/simsage-search/inc/simsage_search_static_view.php on line 6
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/simsage-search/inc/simsage_search_static_view.php on line 56
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simsage-search/inc/simsage_search_static_view.php on line 55
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/simsage-search/inc/simsage_search_static_view.php on line 11
    • > PHP Warning
      include(): Failed opening 'SIMSAGE_PLUGIN_DIRinc/simsage_utilities.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/simsage-search/inc/simsage_upload_archive.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function simsage_get_plan() in wp-content/plugins/simsage-search/inc/simsage_admin_view.php:8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simsage-search/inc/simsage_search_static_view.php on line 40

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: plugin, readme, commercial

simsage-search/simsage-plugin.php 92% from 13 tests

The entry point to "SimSage Search Plugin" version 2.0.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simsage-search.php" instead of "simsage-plugin.php")

Code Analysis Passed 3 tests

File types Passed 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
Everything looks great! No dangerous files found in this plugin25,768 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
JSON20016,417
JavaScript124984894,460
CSS9430772,317
PHP94066392,131
SVG800405
Sass33138

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity41.00
▷ Minimum class complexity31.00
▷ Maximum class complexity51.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods2055.56%
▷ Protected methods00.00%
▷ Private methods1644.44%
Functions45
▷ Named functions4395.56%
▷ Anonymous functions24.44%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png8.46KB3.51KB▼ 58.49%
assets/icon-128x128.png18.10KB3.42KB▼ 81.10%