83% live-admin-navigation-filter

Code Review | Live Admin Navigation Filter

WordPress plugin Live Admin Navigation Filter scored83%from 54 tests.

About plugin

  • Plugin page: live-admin-naviga...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.4.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2012
  • Latest release: Jul 6, 2012
  • Number of updates: 10
  • Update frequency: every 0.3 days
  • Top authors: remybach (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,168 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.99ms] Passed 4 tests

A check of server-side resources used by Live Admin Navigation Filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.53 ▼9.31
Dashboard /wp-admin3.33 ▲0.0245.06 ▼3.96
Posts /wp-admin/edit.php3.38 ▲0.0247.69 ▲2.58
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.67 ▲3.46
Media Library /wp-admin/upload.php3.25 ▲0.0234.00 ▼1.27
Live Admin Nav Filter /wp-admin/options-general.php?page=lnf-options3.2231.42

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
lnf-options
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Live Admin Navigation Filter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.70 ▼0.671.95 ▲0.0339.08 ▼3.16
Dashboard /wp-admin2,226 ▲385.89 ▲0.0499.03 ▼18.0240.23 ▼1.98
Posts /wp-admin/edit.php2,118 ▲262.19 ▲0.1841.32 ▲3.4934.91 ▲0.37
Add New Post /wp-admin/post-new.php1,536 ▲323.35 ▲0.01667.77 ▼2.9152.26 ▼20.68
Media Library /wp-admin/upload.php1,408 ▲204.27 ▲0.0499.28 ▼3.4942.97 ▼2.09
Live Admin Nav Filter /wp-admin/options-general.php?page=lnf-options1,0061.9036.0236.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • lnf-options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/live-admin-navigation-filter/plugin.php:23

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 errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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 require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Example results on expanded menu item.), #2 (Multiple results.), #3 (The settings screen.)
  • Donate link: Invalid url: "Through PayPal... remy[at]bach.me.uk"
The official readme.txt is a good inspiration

live-admin-navigation-filter/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Live Admin Navigation Filter" version 1.0.1
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("live-admin-navigation-filter.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin449 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16138236
JavaScript12641149
CSS15264

PHP code Passed 2 tests

This is a short overview 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.40
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin