10% wp-post-navigator

Code Review | WP Post Navigator

WordPress plugin WP Post Navigator scored10%from 54 tests.

About plugin

  • Plugin page: wp-post-navigator
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.5.1
  • WordPress version: 6.3.1
  • First release: Jul 27, 2013
  • Latest release: Aug 12, 2013
  • Number of updates: 6
  • Update frequency: every 2.8 days
  • Top authors: fantastic plugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /5,961 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WPPostNavigator::reset_default_post_navigation_button_link() should not be called statically

Server metrics [RAM: ▼0.90MB] [CPU: ▼35.48ms] Passed 4 tests

Analyzing server-side resources used by WP Post Navigator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0230.24 ▼10.30
Dashboard /wp-admin3.05 ▼0.3021.71 ▼39.90
Posts /wp-admin/edit.php3.05 ▼0.3122.96 ▼17.86
Add New Post /wp-admin/post-new.php3.05 ▼2.8426.29 ▼71.94
Media Library /wp-admin/upload.php3.05 ▼0.1823.55 ▼12.22
WP Post Navigator /wp-admin/options-general.php?page=wordpress_post_navigation_button3.0524.24

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 12 new options
New WordPress options
post_credits
post_navigation_image_link
widget_recent-posts
widget_recent-comments
post_credits_nofollow_new
db_upgraded
widget_theysaidso_widget
post_credit_text_new
theysaidso_admin_options
post_credit_link
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Post Navigator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.31 ▼1.081.67 ▼0.2042.06 ▲0.71
Dashboard /wp-admin2,210 ▲225.93 ▲0.0397.35 ▼2.4839.29 ▼4.24
Posts /wp-admin/edit.php2,096 ▲71.98 ▼0.0140.77 ▲4.3735.11 ▼0.09
Add New Post /wp-admin/post-new.php1,536 ▲2223.18 ▲5.69649.99 ▼8.4355.73 ▲2.53
Media Library /wp-admin/upload.php1,392 ▲14.26 ▲0.0894.68 ▼1.0539.76 ▼3.83
WP Post Navigator /wp-admin/options-general.php?page=wordpress_post_navigation_button9471.7226.1844.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WPPostNavigator::admin_menu_post_navigation_button_link() should not be called statically
  • Zombie WordPress options were found after uninstall: 12 options
    • post_credits_nofollow_new
    • post_credits_defaults_new
    • post_credit_text_new
    • widget_theysaidso_widget
    • post_credits
    • db_upgraded
    • widget_recent-comments
    • post_credit_link
    • post_navigation_image_link
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wordpress_post_navigation_button
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WPPostNavigator::admin_menu_post_navigation_button_link() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wordpress_post_navigation_button
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WPPostNavigator::register_setting_post_navigation_button_link() should not be called statically

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-post-navigator/wppostnavigator.php:186

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === wp-post-navigator === )
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

wp-post-navigator/wppostnavigator.php 85% from 13 tests

The entry point to "WP Post Navigator" version 1.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-post-navigator.php" instead of "wppostnavigator.php")
  • Description: The description should be shorter than 140 characters (currently 243 characters long)

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
Everything looks great! No dangerous files found in this plugin589 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24816365
CSS1360224

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/favicon.png19.01KB6.16KB▼ 67.58%
assets/type1/5.png0.67KB0.48KB▼ 28.51%
assets/type1/7.png0.75KB0.41KB▼ 44.50%
assets/type1/1.png0.71KB0.49KB▼ 30.59%
assets/type1/4.png0.94KB0.54KB▼ 42.99%