83% navmenusearchadmin

Code Review | Nav Menu search for admin

WordPress plugin Nav Menu search for admin scored83%from 54 tests.

About plugin

  • Plugin page: navmenusearchadmin
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Mar 6, 2017
  • Latest release: Mar 7, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: DESERT_KING (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /433 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: ▼7.68ms] Passed 4 tests

This is a short check of server-side resources used by Nav Menu search for admin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0144.14 ▲7.89
Dashboard /wp-admin3.32 ▲0.0147.06 ▼1.77
Posts /wp-admin/edit.php3.37 ▲0.0143.86 ▼4.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.13 ▼22.08
Media Library /wp-admin/upload.php3.24 ▲0.0133.74 ▼2.60

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Nav Menu search for admin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.35 ▲1.081.81 ▲0.1347.41 ▲5.76
Dashboard /wp-admin2,197 ▲205.66 ▲0.0791.31 ▲1.2142.92 ▼1.52
Posts /wp-admin/edit.php2,102 ▲21.99 ▼0.0332.93 ▼4.9836.55 ▲1.59
Add New Post /wp-admin/post-new.php1,528 ▼023.64 ▲0.67670.86 ▼8.7851.39 ▼8.87
Media Library /wp-admin/upload.php1,409 ▲64.21 ▲0.0196.60 ▼1.0345.33 ▲1.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/navmenusearchadmin/navMenuSearchAdmin.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === navmenusearchadmin === )
  • Donate link: Invalid url: "#"
The official readme.txt is a good inspiration

navmenusearchadmin/navMenuSearchAdmin.php 92% from 13 tests

"Nav Menu search for admin" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("navmenusearchadmin.php" instead of "navMenuSearchAdmin.php")

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 detected1,302 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS141481,222
PHP2232180

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin