84% open-search-document

Code Review | Open Search

WordPress plugin Open Search scored84%from 54 tests.

About plugin

  • Plugin page: open-search-document
  • Plugin version: 4.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jun 24, 2007
  • Latest release: Aug 9, 2023
  • Number of updates: 52
  • Update frequency: every 114.2 days
  • Top authors: pfefferle (96.15%)johnnoone (5.77%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /8,150 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by Open Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0642.23 ▼0.13
Dashboard /wp-admin3.36 ▲0.0651.14 ▼3.72
Posts /wp-admin/edit.php3.48 ▲0.1253.95 ▼0.16
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.14 ▼13.67
Media Library /wp-admin/upload.php3.29 ▲0.0535.66 ▼1.40

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Open Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2914.24 ▲0.001.77 ▲0.1743.88 ▲1.84
Dashboard /wp-admin2,186 ▲95.59 ▲0.02101.62 ▲3.2940.46 ▼4.74
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0234.87 ▼4.2332.16 ▼6.16
Add New Post /wp-admin/post-new.php1,526 ▼023.22 ▲0.28682.83 ▲36.2558.10 ▲0.93
Media Library /wp-admin/upload.php1,403 ▲34.12 ▼0.22107.21 ▼1.3546.39 ▲2.79

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
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/open-search-document/templates/open-search-document.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function OpenSearchDocument\\add_action() in wp-content/plugins/open-search-document/open-search-document.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Firefox OpenSearch plugins), #2 (Safari Quick Website Search), #3 (Chrome Tab to Search)
The official readme.txt is a good inspiration

open-search-document/open-search-document.php Passed 13 tests

The main PHP file in "Open Search" ver. 4.0.0 adds more information about the plugin and also serves as the entry point for this plugin
45 characters long description:
Create an Open Search Document for your blog.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected200 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP545136200

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity5.00
▷ Minimum class complexity3.00
▷ Maximum class complexity7.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods14100.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 6.84MB with 5.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png2,568.45KB654.55KB▼ 74.52%
screenshot-2.png2,447.63KB625.36KB▼ 74.45%
screenshot-1.png1,990.86KB558.96KB▼ 71.92%