84% search-box

Code Review | Search Box

WordPress plugin Search Box scored 84% from 54 tests.

About plugin

  • Plugin page: search-box
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Mar 26, 2021
  • Latest release: Mar 26, 2021
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: hoosoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 521 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.20ms] Passed 4 tests

Server-side resources used by Search Box
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.47 ▼2.74
Dashboard /wp-admin3.32 ▲0.0144.90 ▼1.81
Posts /wp-admin/edit.php3.37 ▲0.0146.88 ▲2.10
Add New Post /wp-admin/post-new.php5.91 ▲0.03108.41 ▲9.20
Media Library /wp-admin/upload.php3.24 ▲0.0134.51 ▲3.26
Search Box Options /wp-admin/options.php6.0233.92

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Search Box: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.37 ▼1.061.68 ▼0.1144.35 ▼2.21
Dashboard /wp-admin2,229 ▲385.01 ▲0.11111.16 ▲8.3540.78 ▲0.97
Posts /wp-admin/edit.php2,114 ▲252.29 ▲0.2641.60 ▲1.7135.11 ▼2.11
Add New Post /wp-admin/post-new.php1,533 ▼923.66 ▲5.38696.35 ▲76.0238.44 ▼22.59
Media Library /wp-admin/upload.php1,411 ▲234.53 ▲0.2998.83 ▼8.7643.73 ▼1.03
Search Box Options /wp-admin/options.php3,1822.1031.0142.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/search-box/inc/options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
1 plugin tags: search form

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

The entry point to "Search Box" version 1.0.1 is a PHP file that has certain tags in its header comment area
80 characters long description:
Animated Search form with Pure CSS3, replace search form with custom CSS styles.

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 plugin319 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24821289
CSS11027
JavaScript1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon-search.png0.84KB0.84KB0.00%
assets/img/gradient.png0.20KB0.35KB0.00%