84% searchwp-modal-search-form

Code Review | SearchWP Modal Search Form

WordPress plugin SearchWP Modal Search Form scored84%from 54 tests.

About plugin

  • Plugin page: searchwp-modal-se...
  • Plugin version: 0.5.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 26, 2019
  • Latest release: Jul 6, 2023
  • Number of updates: 55
  • Update frequency: every 26.8 days
  • Top authors: jchristopher (89.09%)pavlo.opanasenko (9.09%)griffinjt (5.45%)

Code review

54 tests

User reviews

6 reviews

Install metrics

5,000+ active /40,331 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.49ms] Passed 4 tests

Server-side resources used by SearchWP Modal Search Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0742.36 ▼3.22
Dashboard /wp-admin3.37 ▲0.0255.44 ▼6.31
Posts /wp-admin/edit.php3.48 ▲0.1254.72 ▲5.88
Add New Post /wp-admin/post-new.php5.95 ▲0.0791.92 ▼30.32
Media Library /wp-admin/upload.php3.29 ▲0.0644.73 ▲9.93
Modal Form /wp-admin/admin.php?page=searchwp-modal-form3.2737.77

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 59 new files
Database: no new tables, 9 new options
New WordPress options
searchwp_modal_form_version
searchwp_lite_admin_notifications
searchwp_modal_form_last_update
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

SearchWP Modal Search Form: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲9214.37 ▲0.011.86 ▲0.3443.57 ▼0.75
Dashboard /wp-admin2,262 ▲825.65 ▼0.0393.74 ▼0.4240.15 ▼3.91
Posts /wp-admin/edit.php2,168 ▲682.01 ▲0.0240.71 ▲1.9137.87 ▲0.26
Add New Post /wp-admin/post-new.php6,216 ▲4,68619.13 ▼4.05977.13 ▲316.0951.73 ▲0.55
Media Library /wp-admin/upload.php1,464 ▲614.29 ▲0.1595.73 ▼10.2341.78 ▼2.43
Modal Form /wp-admin/admin.php?page=searchwp-modal-form1,2312.0826.2964.50

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • searchwp_modal_form_last_update
    • theysaidso_admin_options
    • widget_recent-comments
    • searchwp_lite_admin_notifications
    • widget_theysaidso_widget
    • searchwp_modal_form_version
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_search_form() in wp-content/plugins/searchwp-modal-search-form/templates/default.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: modal, searchwp, form, searchform, search

searchwp-modal-search-form/searchwp-modal-form.php 85% from 13 tests

The primary PHP file in "SearchWP Modal Search Form" version 0.5.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires PHP: Required version must match the one declared in readme.txt ("7.0" instead of "5.6")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("searchwp-modal-search-form.php" instead of "searchwp-modal-form.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin10,827 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JSON2004,737
SVG1002,671
PHP156571,1312,194
CSS412310703
JavaScript12103135463
Markdown132059

PHP code Passed 2 tests

A short 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.43
Average class complexity22.36
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods110
▷ Static methods4238.18%
▷ Public methods7265.45%
▷ Protected methods00.00%
▷ Private methods3834.55%
Functions17
▷ Named functions1164.71%
▷ Anonymous functions635.29%
Constants12
▷ Global constants433.33%
▷ Class constants866.67%
▷ Public constants562.50%

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
9 compressed PNG files occupy 0.53MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png12.52KB13.69KB0.00%
assets/banner-1544x500.png35.67KB37.98KB0.00%
assets/icon-128x128.png4.21KB4.84KB0.00%
assets/screenshot-5.png87.65KB95.16KB0.00%
assets/screenshot-2.png194.64KB215.63KB0.00%