62% wp-next-post-navi

Code Review | WP Next Post Navi

WordPress plugin WP Next Post Navi scored62%from 54 tests.

About plugin

  • Plugin page: wp-next-post-navi
  • Plugin version: 1.8.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 6.3.1
  • First release: Dec 18, 2019
  • Latest release: May 1, 2020
  • Number of updates: 30
  • Update frequency: every 4.5 days
  • Top authors: kharim (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active /12,835 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼38.15ms] Passed 4 tests

A check of server-side resources used by WP Next Post Navi
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0137.70 ▼4.33
Dashboard /wp-admin3.00 ▼0.3422.77 ▼43.19
Posts /wp-admin/edit.php3.00 ▼0.3527.55 ▼21.04
Add New Post /wp-admin/post-new.php3.00 ▼2.8927.91 ▼74.07
Media Library /wp-admin/upload.php3.00 ▼0.2323.77 ▼14.31

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

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

Browser metrics Passed 4 tests

WP Next Post Navi: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.20 ▼1.002.13 ▲0.0944.72 ▲0.78
Dashboard /wp-admin2,213 ▲285.79 ▲0.91106.76 ▼4.5349.24 ▲8.23
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0241.11 ▲3.8139.20 ▲0.05
Add New Post /wp-admin/post-new.php1,517 ▼217.82 ▼5.39640.00 ▼35.0251.84 ▼0.15
Media Library /wp-admin/upload.php1,392 ▲74.23 ▼0.00100.66 ▼11.6243.59 ▼2.10
WP Next Post Navigation /wp-admin/wp-next-post-navi.php260.440.0914.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • wp_next_post_navi_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 output text when accessed directly:
    • > /wp-content/plugins/wp-next-post-navi/wp-next-post-navi.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wp-next-post-navi/wp-next-post-navi-admin-options.php:90
    • > PHP Notice
      Undefined variable: action_url in wp-content/plugins/wp-next-post-navi/wp-next-post-navi-admin-options.php on line 88

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/wp-next-post-navi.php
    • > Network (severe)
    wp-admin/wp-next-post-navi.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can take inspiration from this readme.txt

wp-next-post-navi/wp-next-post-navi.php 85% from 13 tests

The principal PHP file in "WP Next Post Navi" v. 1.8.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 347 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin812 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP29839675
CSS1200137

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code1.22
Average class complexity157.00
▷ Minimum class complexity157.00
▷ Maximum class complexity157.00
Average method complexity15.18
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/prev.png8.09KB4.01KB▼ 50.39%
img/next.png6.81KB3.48KB▼ 48.87%
img/soon.png15.74KB7.14KB▼ 54.62%