84% smart-search-and-product-finder

Code Review | Smart Search & Product Finder

WordPress plugin Smart Search & Product Finder scored84%from 54 tests.

About plugin

  • Plugin page: smart-search-and-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4.33+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 12, 2023
  • Latest release: Jun 12, 2023
  • Number of updates: 4
  • Update frequency: every 5.8 days
  • Top authors: riafytech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /88 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.95ms] Passed 4 tests

Server-side resources used by Smart Search & Product Finder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.13 ▼4.33
Dashboard /wp-admin3.31 ▲0.0047.45 ▼2.92
Posts /wp-admin/edit.php3.36 ▲0.0047.12 ▲1.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.48 ▼22.72
Media Library /wp-admin/upload.php3.23 ▲0.0034.02 ▼1.84

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Smart Search & Product Finder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.231.79 ▲0.0442.64 ▼0.67
Dashboard /wp-admin2,206 ▲154.87 ▼0.04107.98 ▼1.0441.86 ▼6.02
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0339.06 ▲1.5435.30 ▲2.24
Add New Post /wp-admin/post-new.php1,514 ▼2817.57 ▼0.64690.80 ▲74.1555.29 ▼0.62
Media Library /wp-admin/upload.php1,391 ▲94.21 ▼0.0295.77 ▼3.1343.03 ▼0.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-search-and-product-finder/lib/update_product_changes.php:113
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-search-and-product-finder/lib/dashboard.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/smart-search-and-product-finder/esse_plugin.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: search, product search, artificial intelligence, natural language processing, enhanced search...

smart-search-and-product-finder/esse_plugin.php 85% from 13 tests

This is the main PHP file of "Smart Search & Product Finder" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 346 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("smart-search-and-product-finder.php" instead of "esse_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,574 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP135517725
CSS415057589
JavaScript3824260

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions2295.65%
▷ Anonymous functions14.35%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin