84% responsive-search

Code Review | Responsive Search Widget

WordPress plugin Responsive Search Widget scored84%from 54 tests.

About plugin

  • Plugin page: responsive-search
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Dec 23, 2015
  • Latest release: Feb 4, 2016
  • Number of updates: 21
  • Update frequency: every 2.1 days
  • Top authors: smartscrutiny (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,037 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.73ms] Passed 4 tests

An overview of server-side resources used by Responsive Search Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.87 ▼4.03
Dashboard /wp-admin3.31 ▼0.0344.11 ▼12.24
Posts /wp-admin/edit.php3.37 ▲0.0142.85 ▼1.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.95 ▼12.46
Media Library /wp-admin/upload.php3.24 ▲0.0130.91 ▼2.18

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_wpb_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Responsive Search Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.22 ▼0.161.77 ▲0.1441.23 ▲1.84
Dashboard /wp-admin2,195 ▲215.61 ▲0.0880.97 ▼5.9835.34 ▼4.63
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0334.17 ▼4.3533.06 ▼4.11
Add New Post /wp-admin/post-new.php1,529 ▲123.03 ▲0.03631.76 ▼55.7050.98 ▼1.28
Media Library /wp-admin/upload.php1,400 ▼34.16 ▼0.0495.41 ▼4.4141.25 ▼7.38

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_wpb_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/responsive-search/responsive-search.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === responsive-search === )
Please take inspiration from this readme.txt

responsive-search/responsive-search.php 92% from 13 tests

This is the main PHP file of "Responsive Search Widget" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 477 characters long)

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
Everything looks great! No dangerous files found in this plugin49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122149

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
screenshot-1.PNG1.98KB1.65KB▼ 16.65%