84% wp-post-nav

Code Review | WP Post Nav

WordPress plugin WP Post Nav scored84%from 54 tests.

About plugin

  • Plugin page: wp-post-nav
  • Plugin version: 2.0.3
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 6, 2018
  • Latest release: Jul 25, 2023
  • Number of updates: 26
  • Update frequency: every 66.3 days
  • Top authors: jo4nny8 (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

500+ active /12,550 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼2.11ms] Passed 4 tests

This is a short check of server-side resources used by WP Post Nav
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2538.60 ▼5.27
Dashboard /wp-admin3.65 ▲0.3549.86 ▲4.28
Posts /wp-admin/edit.php3.70 ▲0.3452.16 ▲8.04
Add New Post /wp-admin/post-new.php6.16 ▲0.2882.53 ▼12.78
Media Library /wp-admin/upload.php3.49 ▲0.2638.69 ▲5.32
WP Post Nav /wp-admin/options-general.php?page=wp-post-nav3.4837.56

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
wp_post_nav_options
can_compress_scripts
wp_post_nav_version
widget_recent-comments

Browser metrics Passed 4 tests

WP Post Nav: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲19814.64 ▲0.291.67 ▼0.0041.28 ▲1.70
Dashboard /wp-admin2,360 ▲1866.37 ▲0.67103.24 ▲14.7836.81 ▼17.08
Posts /wp-admin/edit.php2,291 ▲1913.54 ▲1.5748.97 ▲12.4131.77 ▼3.30
Add New Post /wp-admin/post-new.php1,548 ▲2023.48 ▲0.37651.68 ▼28.9641.42 ▼7.26
Media Library /wp-admin/upload.php1,428 ▲284.44 ▲0.2581.52 ▼24.7541.79 ▼3.31
WP Post Nav /wp-admin/options-general.php?page=wp-post-nav2,1804.4881.8188.16

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 7× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-post-nav/public/partials/wp-post-nav-public-primary.php
    • > /wp-content/plugins/wp-post-nav/public/partials/wp-post-nav-public-page.php
    • > /wp-content/plugins/wp-post-nav/admin/partials/wp-post-nav-admin-sidebar.php
    • > /wp-content/plugins/wp-post-nav/public/partials/wp-post-nav-public-attachment.php
    • > /wp-content/plugins/wp-post-nav/public/partials/wp-post-nav-public-product.php
    • > /wp-content/plugins/wp-post-nav/public/partials/wp-post-nav-public-default.php
    • > /wp-content/plugins/wp-post-nav/public/partials/wp-post-nav-public-post.php

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: navigation, custom post navigation, next nav, previous nav, post navigation...

wp-post-nav/wp-post-nav.php Passed 13 tests

The entry point to "WP Post Nav" version 2.0.3 is a PHP file that has certain tags in its header comment area
98 characters long description:
Wordpress Posts Navigation Plugin. Navigate between posts, pages and custom post types with ease.

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
No dangerous file extensions were detected3,242 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP185537232,698
CSS27820498
JavaScript2133246

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity27.29
▷ Minimum class complexity1.00
▷ Maximum class complexity103.00
Average method complexity5.29
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods3786.05%
▷ Protected methods00.00%
▷ Private methods613.95%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/left-arrow.png2.92KB0.40KB▼ 86.37%
admin/images/logo.png13.56KB12.36KB▼ 8.88%
public/images/default_fallback.png13.56KB12.36KB▼ 8.88%
public/images/right-arrow.png2.90KB0.38KB▼ 87.02%