10% widget-to-search-from-ofruru

Code Review | Widget to search from ofru.ru

WordPress plugin Widget to search from ofru.ru scored10%from 54 tests.

About plugin

  • Plugin page: widget-to-search-...
  • Plugin version: 1.2.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.6
  • WordPress version: 6.3.1
  • First release: Jul 12, 2013
  • Latest release: Sep 23, 2016
  • Number of updates: 29
  • Update frequency: every 40.3 days
  • Top authors: ofru (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,122 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/widget-to-search-from-ofruru/widget-to-search-from-ofruru.php+17
    Methods with the same name as their class will not be constructors in a future version of PHP; widget_to_search_from_ofruru has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼56.60ms] Passed 4 tests

An overview of server-side resources used by Widget to search from ofru.ru
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.394.13 ▼41.53
Dashboard /wp-admin2.10 ▼1.216.62 ▼48.53
Posts /wp-admin/edit.php2.10 ▼1.265.77 ▼48.03
Add New Post /wp-admin/post-new.php2.10 ▼3.797.56 ▼88.32
Media Library /wp-admin/upload.php2.10 ▼1.136.71 ▼33.79

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_widget-to-search-from-ofruru
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Widget to search from ofru.ru: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.28 ▼0.301.90 ▲0.1742.83 ▲2.76
Dashboard /wp-admin2,198 ▲215.62 ▼0.0393.18 ▲0.0240.59 ▲1.30
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0043.44 ▲1.2537.30 ▼3.45
Add New Post /wp-admin/post-new.php1,526 ▼223.45 ▲0.39627.08 ▼53.0456.11 ▲0.24
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.0695.38 ▼21.9042.14 ▼5.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/widget-to-search-from-ofruru/widget-to-search-from-ofruru.php+17
    Methods with the same name as their class will not be constructors in a future version of PHP; widget_to_search_from_ofruru has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_widget-to-search-from-ofruru

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/widget-to-search-from-ofruru/widget-to-search-from-ofruru.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
  • Plugin Name: You should set the name of your plugin on the first line ( === widget-to-search-from-ofruru === )
  • Screenshots: Screenshot #1 (Widget options) image not found
The official readme.txt is a good inspiration

widget-to-search-from-ofruru/widget-to-search-from-ofruru.php Passed 13 tests

"Widget to search from ofru.ru" version 1.2.4.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
126 characters long description:
Enables a Custom Search Engine for your site via a widget. To add goto Appearance > Widgets. Thank you for choosing my widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected184 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PO File23034111
PHP191373

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png12.92KB5.75KB▼ 55.53%