83% woo-metaphone-product-search

Code Review | Woo Metaphone Product Search

WordPress plugin Woo Metaphone Product Search scored83%from 54 tests.

About plugin

  • Plugin page: woo-metaphone-pro...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 26, 2017
  • Latest release: Mar 21, 2018
  • Number of updates: 4
  • Update frequency: every 82.8 days
  • Top authors: manojroka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /532 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▼3.45ms] Passed 4 tests

Analyzing server-side resources used by Woo Metaphone Product Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2342.18 ▲3.34
Dashboard /wp-admin3.52 ▲0.2150.28 ▲0.11
Posts /wp-admin/edit.php3.63 ▲0.2753.06 ▲0.87
Add New Post /wp-admin/post-new.php6.10 ▲0.2189.75 ▼18.13
Media Library /wp-admin/upload.php3.44 ▲0.2145.49 ▲8.44

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 19 new files
Database: 1 new table, 12 new options
New tables
wp_gc_doublemetaphone
New WordPress options
gc_ajax_search_for_wpbox
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
gc_num_chars
widget_theysaidso_widget
gc_num_results
db_upgraded
gc_display_black_shadow
gc_load_datatable
...

Browser metrics Passed 4 tests

Checking browser requirements for Woo Metaphone Product Search
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲14814.01 ▼0.7210.29 ▲8.6639.18 ▼2.61
Dashboard /wp-admin2,221 ▲415.84 ▲0.20105.87 ▲17.2036.67 ▼9.08
Posts /wp-admin/edit.php2,126 ▲232.30 ▲0.2941.70 ▲5.4736.83 ▲1.55
Add New Post /wp-admin/post-new.php1,549 ▲2123.36 ▲0.19609.84 ▼90.4649.15 ▼0.63
Media Library /wp-admin/upload.php1,423 ▲264.47 ▲0.2797.33 ▼20.1844.53 ▼2.80

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-metaphone-product-search/gc_doublemetaphone.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (`/assets/searchresult.png`), #2 (`/assets/adminscreen.png`)
Please take inspiration from this readme.txt

woo-metaphone-product-search/gc_doublemetaphone.php 69% from 13 tests

The primary PHP file in "Woo Metaphone Product Search" version 1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 317 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/search")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-metaphone-product-search.php" instead of "gc_doublemetaphone.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,926 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP41912401,278
CSS3552404
JavaScript2109244

PHP code Passed 2 tests

This is a very shot review of 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 complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods642.86%
▷ Public methods1071.43%
▷ Protected methods00.00%
▷ Private methods428.57%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/more.png0.46KB0.64KB0.00%
images/sort_both.png0.20KB0.29KB0.00%
images/sort_desc_disabled.png0.14KB0.25KB0.00%
images/close.png0.46KB0.63KB0.00%
images/sort_desc.png0.15KB0.25KB0.00%