84% multisite-global-search

Code Review | Multisite Global Search

WordPress plugin Multisite Global Search scored84%from 54 tests.

About plugin

  • Plugin page: multisite-global-...
  • Plugin version: 1.2.14
  • PHP version: 7.4.16
  • WordPress compatibility: WordPress 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2010
  • Latest release: Feb 13, 2017
  • Number of updates: 34
  • Update frequency: every 69.5 days
  • Top authors: aliciagh (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10+ active /31,422 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
Install script ran successfully

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

A check of server-side resources used by Multisite Global Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.10 ▼6.72
Dashboard /wp-admin3.32 ▲0.0146.98 ▼5.76
Posts /wp-admin/edit.php3.37 ▲0.0150.56 ▲1.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.18 ▼33.57
Media Library /wp-admin/upload.php3.24 ▲0.0135.89 ▼1.10

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Multisite Global Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.72 ▲0.171.98 ▲0.1945.65 ▲1.79
Dashboard /wp-admin2,206 ▲265.51 ▼0.1587.32 ▼3.8542.40 ▲5.87
Posts /wp-admin/edit.php2,111 ▲112.03 ▲0.0640.12 ▲1.0837.57 ▲2.42
Add New Post /wp-admin/post-new.php1,540 ▲1423.93 ▲0.79624.67 ▼10.9060.43 ▲1.11
Media Library /wp-admin/upload.php1,405 ▲54.19 ▲0.0399.68 ▼1.7643.95 ▼4.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/multisite-global-search/multisite-global-search.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/multisite-global-search/inc/class.widgets.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Widget configuration.), #2 (Vertical Global Search widget.), #3 (Horizontal Global Search widget.)
You can take inspiration from this readme.txt

multisite-global-search/multisite-global-search.php 92% from 13 tests

The entry point to "Multisite Global Search" version 1.2.14 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "WordPress 3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,990 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PO File114839251,180
PHP6128160734
CSS120576

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.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
3 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png15.32KB5.10KB▼ 66.72%
screenshot-1.png22.87KB7.28KB▼ 68.16%
screenshot-2.png18.31KB5.93KB▼ 67.61%