90% wp-home-page-menu

Code Review | WP Home Page Menu

WordPress plugin WP Home Page Menu scored90%from 54 tests.

About plugin

  • Plugin page: wp-home-page-menu
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 26, 2016
  • Latest release: Feb 18, 2022
  • Number of updates: 19
  • Update frequency: every 115.0 days
  • Top authors: freewptp (57.89%)vinod dalvi (47.37%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /13,114 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼9.42ms] Passed 4 tests

An overview of server-side resources used by WP Home Page Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.48 ▼6.38
Dashboard /wp-admin3.41 ▲0.0746.25 ▼10.48
Posts /wp-admin/edit.php3.53 ▲0.1747.59 ▼0.39
Add New Post /wp-admin/post-new.php6.01 ▲0.1381.66 ▼20.41
Media Library /wp-admin/upload.php3.34 ▲0.1134.53 ▲2.30
WP Home Page Menu /wp-admin/options-general.php?page=wp_home_page_menu3.2934.35

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
wp_home_page_menu
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Home Page Menu: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.56 ▲0.211.51 ▼0.1037.82 ▲0.85
Dashboard /wp-admin2,221 ▲445.60 ▲0.0682.12 ▼4.1140.30 ▼1.49
Posts /wp-admin/edit.php2,132 ▲322.03 ▲0.0239.36 ▲3.8137.67 ▲0.95
Add New Post /wp-admin/post-new.php1,549 ▲2123.78 ▲0.58681.62 ▲32.4162.78 ▲10.51
Media Library /wp-admin/upload.php1,429 ▲324.24 ▲0.10109.02 ▲8.8749.89 ▲4.90
WP Home Page Menu /wp-admin/options-general.php?page=wp_home_page_menu8842.0422.5225.71

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • wp_home_page_menu
    • db_upgraded

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: home menu, home page menu, menu, home page navigation menu, navigation bar home menu

wp-home-page-menu/wp-home-page-menu.php Passed 13 tests

"WP Home Page Menu" version 3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
102 characters long description:
This plugin displays home page menu in the navigation bar which can be configured from the admin area.

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
Good job! No executable or dangerous file extensions detected418 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9148428335
PO File1242970
JavaScript11413

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.86
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods3487.18%
▷ Protected methods00.00%
▷ Private methods512.82%
Functions3
▷ Named functions3100.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