74% woosearch

Code Review | WooSearch

WordPress plugin WooSearch scored74%from 54 tests.

About plugin

  • Plugin page: woosearch
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5
  • WordPress version: 6.3.1
  • First release: Aug 4, 2016
  • Latest release: Aug 4, 2016
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: sebastianhsu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /932 total downloads

Benchmarks

Plugin footprint 65% 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.01MB] [CPU: ▼4.72ms] Passed 4 tests

Server-side resources used by WooSearch
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.76 ▼0.55
Dashboard /wp-admin3.31 ▼0.0444.37 ▼14.43
Posts /wp-admin/edit.php3.36 ▲0.0046.69 ▼0.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.51 ▼1.95
Media Library /wp-admin/upload.php3.23 ▲0.0034.56 ▼1.95

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 41 new files
Database: 1 new table, 7 new options
New tables
wp_woosearch_keywords
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_side_woosearch-widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

WooSearch: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7914.62 ▲0.091.90 ▼0.1244.13 ▲2.96
Dashboard /wp-admin2,195 ▲285.63 ▲0.1088.46 ▼6.7336.34 ▼3.34
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0341.68 ▲0.1037.72 ▲0.80
Add New Post /wp-admin/post-new.php1,526 ▼921.24 ▲3.05700.57 ▲26.3960.65 ▼16.34
Media Library /wp-admin/upload.php1,400 ▼34.21 ▲0.03103.75 ▼2.8545.34 ▲0.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_woosearch_keywords
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_side_woosearch-widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woosearch/includes/woosearch-apis.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_media() in wp-content/plugins/woosearch/views/woosearch-options.php:4

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Promotion Keywords.), #2 (Real-time Ajax Search.)
The official readme.txt is a good inspiration

woosearch/woosearch.php Passed 13 tests

The entry point to "WooSearch" version 1.0.0 is a PHP file that has certain tags in its header comment area
69 characters long description:
An search engine that helps you search products based on WooCommerce.

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 detected2,987 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
SVG403764
CSS4853650
PHP68457568
JavaScript87641531
Sass33120347
PO File24044127

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.50
▷ Minimum class complexity3.00
▷ Maximum class complexity6.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-arrow-down.png1.14KB0.37KB▼ 67.87%