79% loop-post-navigation-links

Code Review | Loop Post Navigation Links

WordPress plugin Loop Post Navigation Links scored 79% from 54 tests.

About plugin

  • Plugin page: loop-post-navigat...
  • Plugin version: 3.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5
  • WordPress version: 6.3.1
  • First release: Jul 23, 2009
  • Latest release: Aug 27, 2020
  • Number of updates: 20
  • Update frequency: every 205.5 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active / 20,912 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.44ms] Passed 4 tests

A check of server-side resources used by Loop Post Navigation Links
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.14 ▼3.68
Dashboard /wp-admin3.32 ▲0.0258.80 ▲7.97
Posts /wp-admin/edit.php3.37 ▲0.0146.07 ▼4.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.00 ▼6.37
Media Library /wp-admin/upload.php3.24 ▲0.0136.98 ▲0.66

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Loop Post Navigation Links
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.54 ▼0.731.77 ▼0.0544.41 ▲1.52
Dashboard /wp-admin2,206 ▲184.87 ▼0.04102.76 ▼13.2937.61 ▼10.59
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0435.50 ▲0.3235.84 ▲0.18
Add New Post /wp-admin/post-new.php1,533 ▲1122.98 ▼0.06666.31 ▲15.3354.93 ▲4.92
Media Library /wp-admin/upload.php1,391 ▲64.23 ▲0.0195.67 ▼9.3943.76 ▼0.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/loop-post-navigation-links/phpunit/bootstrap.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/loop-post-navigation-links/phpunit/bootstrap.php on line 17
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/loop-post-navigation-links/phpunit/bootstrap.php on line 17

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: portfolio, next, links, navigation, previous_post_link...

loop-post-navigation-links/loop-post-navigation-links.php Passed 13 tests

"Loop Post Navigation Links" version 3.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
136 characters long description:
Template tags (for single.php) to create post navigation loop (previous to first post is last post; next/after last post is first post).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected614 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4141346377
Markdown3400202
Bourne Shell16221
XML10014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.50
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity1.37
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods38.82%
▷ Public methods3088.24%
▷ Protected methods411.76%
▷ Private methods00.00%
Functions19
▷ Named functions1578.95%
▷ Anonymous functions421.05%
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
No PNG images were found in this plugin