84% page-navigation-by-menu

Code Review | Page navigation by menu

WordPress plugin Page navigation by menu scored84%from 54 tests.

About plugin

  • Plugin page: page-navigation-b...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.0
  • WordPress version: 6.3.1
  • First release: Jul 8, 2022
  • Latest release: May 3, 2023
  • Number of updates: 9
  • Update frequency: every 33.3 days
  • Top authors: lovor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /560 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.35MB] [CPU: ▼20.33ms] Passed 4 tests

This is a short check of server-side resources used by Page navigation by menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0236.36 ▼6.29
Dashboard /wp-admin3.25 ▼0.0539.97 ▼11.94
Posts /wp-admin/edit.php3.30 ▼0.0644.74 ▼7.66
Add New Post /wp-admin/post-new.php4.62 ▼1.2742.99 ▼55.42
Media Library /wp-admin/upload.php3.25 ▲0.0237.78 ▼0.25

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Page navigation by menu
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.192.08 ▼0.3041.78 ▼3.41
Dashboard /wp-admin2,189 ▲125.63 ▼0.0386.73 ▼0.4539.86 ▼7.82
Posts /wp-admin/edit.php2,100 ▲32.09 ▲0.0838.14 ▲1.6434.83 ▲1.25
Add New Post /wp-admin/post-new.php1,526 ▼023.00 ▼0.14668.38 ▼34.2168.10 ▲5.86
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.01101.95 ▼15.9845.88 ▼2.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/page-navigation-by-menu/index.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function page_nav_by_menu\\wp_die() in wp-content/plugins/page-navigation-by-menu/internal.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: previous, navigation, next, menu, page

page-navigation-by-menu/index.php 85% from 13 tests

"Page navigation by menu" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("page-navigation-by-menu.php" instead of "index.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin99 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2298499

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
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
Namespaces1
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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