10% admin-global-search

Code Review | Admin Global Search

WordPress plugin Admin Global Search scored 10% from 54 tests.

About plugin

  • Plugin page: admin-global-search
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.0.2
  • WordPress version: 5.8.1
  • First release: Jun 9, 2017
  • Latest release: Jan 4, 2019
  • Number of updates: 11
  • Update frequency: every 52.3 days
  • Top authors: webplanetsoft (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

90+ active / 1,902 total downloads

Benchmarks

Plugin footprint 58% 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
    • > User notice in wp-includes/functions.php+5663
    register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.88MB] [CPU: ▼190.85ms] Passed 4 tests

This is a short check of server-side resources used by Admin Global Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.75 ▼1.093.63 ▼21.83
Dashboard /wp-admin1.77 ▼1.303.43 ▼40.91
Posts /wp-admin/edit.php1.77 ▼1.343.48 ▼30.55
Add New Post /wp-admin/post-new.php1.77 ▼3.673.61 ▼670.11
Media Library /wp-admin/upload.php1.77 ▼1.233.97 ▼20.51

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Admin Global Search
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,725 ▲12415.49 ▼0.076.27 ▼0.3175.67 ▼0.72
Dashboard /wp-admin2,988 ▲896.21 ▲0.08115.99 ▼16.27201.19 ▲21.21
Posts /wp-admin/edit.php2,799 ▲623.12 ▼0.1062.78 ▼0.77150.94 ▲9.86
Add New Post /wp-admin/post-new.php3,932 ▲16518.15 ▼1.09421.25 ▼7.83236.31 ▲71.58
Media Library /wp-admin/upload.php1,808 ▲595.55 ▲0.00127.61 ▼15.62217.95 ▲30.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5663
    register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/admin-global-search/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: page, admin, post, search

admin-global-search/index.php 92% from 13 tests

Analyzing the main PHP file in "Admin Global Search" version 1.0.0
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("admin-global-search.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected244 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4239113
CSS1200106
JavaScript13025

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
3 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png33.96KB15.10KB▼ 55.55%
src/search.png116.04KB30.39KB▼ 73.81%
screenshot-2.png44.16KB19.09KB▼ 56.77%