88% admin-search

Code Review | Admin Search

WordPress plugin Admin Search scored 88% from 54 tests.

About plugin

  • Plugin page: admin-search
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.2-5.9
  • WordPress version: 5.9.2
  • First release: Mar 18, 2020
  • Latest release: Jan 31, 2022
  • Number of updates: 27
  • Update frequency: every 25.3 days
  • Top authors: andrewstichbury (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 1,936 total downloads

Benchmarks

Plugin footprint Passed 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.19MB] [CPU: ▼288.68ms] Passed 4 tests

Server-side resources used by Admin Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.2554.49 ▲3.04
Dashboard /wp-admin3.63 ▲0.2245.13 ▲12.04
Posts /wp-admin/edit.php3.85 ▲0.2145.18 ▲7.77
Add New Post /wp-admin/post-new.php7.09 ▲0.1299.26 ▼1,168.07
Media Library /wp-admin/upload.php3.50 ▲0.2127.08 ▲2.56
Admin Search /wp-admin/options-general.php?page=admin-search3.4525.13

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Admin Search
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,847 ▲9316.41 ▲0.555.66 ▼1.022.23 ▼0.58
Dashboard /wp-admin2,952 ▲726.47 ▼0.15141.25 ▼9.63181.48 ▲9.56
Posts /wp-admin/edit.php2,739 ▲483.47 ▲0.0465.18 ▲2.62145.92 ▲1.17
Add New Post /wp-admin/post-new.php1,702 ▼5018.87 ▼2.79398.06 ▼73.52159.23 ▲0.08
Media Library /wp-admin/upload.php1,733 ▲325.87 ▲0.15137.13 ▼10.56185.15 ▼4.62
Admin Search /wp-admin/options-general.php?page=admin-search1,2752.8055.77136.45

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=admin-search
    • > Warning in wp-content/plugins/admin-search/settings.php+552
    in_array() expects parameter 2 to be array, null given

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
Please fix the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/admin-search/admin-results.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-search/settings.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-search/ajax.php:800
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-search/ui.php:146

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: search, admin, advanced

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

The main file in "Admin Search" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 208 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,296 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP54742221,375
CSS11280510
JavaScript1840286
Markdown1340125

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions2990.62%
▷ Anonymous functions39.38%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin