74% press-search

Code Review | PressSEARCH

WordPress plugin PressSEARCH scored 74% from 54 tests.

About plugin

  • Plugin page: press-search
  • Plugin version: 0.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1.0-5.2
  • WordPress version: 5.8.1
  • First release: May 17, 2019
  • Latest release: Jul 1, 2019
  • Number of updates: 4
  • Update frequency: every 11.3 days
  • Top authors: pressmaximum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 347 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲1.35MB] [CPU: ▼120.90ms] Passed 4 tests

Server-side resources used by PressSEARCH
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.18 ▲1.3450.04 ▲15.35
Dashboard /wp-admin4.40 ▲1.3568.43 ▲18.19
Posts /wp-admin/edit.php4.46 ▲1.3564.13 ▲16.09
Add New Post /wp-admin/post-new.php6.80 ▲1.37124.12 ▼533.21
Media Library /wp-admin/upload.php4.36 ▲1.3654.07 ▲21.72
Settings /wp-admin/admin.php?page=press-search-settings4.9665.34
Reports /wp-admin/admin.php?page=press-search-report4.3848.58

Server storage [IO: ▲3.94MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 433 new files
Database: 2 new tables, 2 new options
New tables
wp_ps_index
wp_ps_logs
New WordPress options
press_search_last_time_index
press_search_index_count

Browser metrics Passed 4 tests

Checking browser requirements for PressSEARCH
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,871 ▲29916.40 ▲0.4315.83 ▲5.3445.40 ▼3.84
Dashboard /wp-admin3,008 ▲716.21 ▲0.30143.58 ▼5.56107.26 ▼1.73
Posts /wp-admin/edit.php2,777 ▲382.74 ▲0.0365.87 ▼6.9985.27 ▼1.25
Add New Post /wp-admin/post-new.php1,721 ▲3815.56 ▼3.15383.94 ▲22.23110.18 ▼0.02
Media Library /wp-admin/upload.php1,845 ▲385.08 ▲0.08164.05 ▲10.79111.18 ▲1.23
Settings /wp-admin/admin.php?page=press-search-settings1,9662.4284.3998.89
Reports /wp-admin/admin.php?page=press-search-report2,0063.96173.05102.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables detected upon uninstall: 2 tables
    • wp_ps_index
    • wp_ps_logs
  • This plugin does not fully uninstall, leaving 2 options in the database
    • press_search_index_count
    • press_search_last_time_index

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 74× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/press-search/inc/admin/cmb2_fields/class-keyword-redirect.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/press-search/templates/reports/searches-logs.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/press-search/inc/3rd/CMB2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/press-search/inc/3rd/CMB2/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function press_search_get_setting() in wp-content/plugins/press-search/inc/class-searching.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/press-search/inc/admin/class-setting-hooks.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/press-search/inc/3rd/CMB2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/press-search/templates/suggest-keywords.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/press-search/templates/reports/popular-searches.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/press-search/templates/reports/overview.php:2

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 issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: search, better search, live search, ajax search

press-search/press-search.php Passed 13 tests

The main PHP script in "PressSEARCH" version 0.0.3 is automatically included on every request by WordPress
77 characters long description:
A better search engine for WordPress and WooCommerce. Quickly and accurately.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin72,168 lines of code in 275 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
JavaScript112,5722,71712,529
PHP992,4817,00112,164
CSS191,3261,1986,656
JSON3005,162
Sass18368282,359
Markdown32150634
HTML1496298
XML18443

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity24.24
▷ Minimum class complexity1.00
▷ Maximum class complexity218.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes89
▷ Abstract classes88.99%
▷ Concrete classes8191.01%
▷ Final classes00.00%
Methods824
▷ Static methods9912.01%
▷ Public methods71186.29%
▷ Protected methods11013.35%
▷ Private methods30.36%
Functions48
▷ Named functions4797.92%
▷ Anonymous functions12.08%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
20 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/3rd/CMB2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
inc/3rd/CMB2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
inc/3rd/CMB2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
inc/3rd/CMB2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
assets/jquery-ui/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%