79% admin-post-navigation

Code Review | Admin Post Navigation

WordPress plugin Admin Post Navigation scored 79% from 54 tests.

About plugin

  • Plugin page: admin-post-naviga...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Jun 15, 2009
  • Latest release: Apr 18, 2018
  • Number of updates: 22
  • Update frequency: every 147.6 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

38 reviews

Install metrics

10,000+ active / 134,051 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.01MB] [CPU: ▼6.60ms] Passed 4 tests

Server-side resources used by Admin Post Navigation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.48 ▼5.29
Dashboard /wp-admin3.31 ▲0.0144.63 ▼2.79
Posts /wp-admin/edit.php3.36 ▲0.0147.45 ▼0.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.72 ▼17.58
Media Library /wp-admin/upload.php3.23 ▲0.0132.38 ▼0.19

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Admin Post Navigation
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.45 ▲0.131.72 ▼0.5040.65 ▼1.31
Dashboard /wp-admin2,203 ▲185.82 ▲0.01101.89 ▼1.0040.16 ▼5.82
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0533.63 ▼6.9637.16 ▲0.33
Add New Post /wp-admin/post-new.php1,533 ▼923.31 ▲5.02661.40 ▲62.8054.52 ▼1.88
Media Library /wp-admin/upload.php1,388 ▲34.22 ▼0.0195.55 ▼2.7643.18 ▼0.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/admin-post-navigation/tests/bootstrap.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/admin-post-navigation/tests/bootstrap.php on line 17
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/admin-post-navigation/tests/bootstrap.php on line 17

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

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
8 plugin tags: edit, previous, post, admin, navigation...

admin-post-navigation/admin-post-navigation.php Passed 13 tests

The main file in "Admin Post Navigation" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
97 characters long description:
Adds links to navigate to the next and previous posts when editing a post in the WordPress admin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected539 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4186299462
CSS10025
Bourne Shell17322
XML10014
Markdown113012
JavaScript1004

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity18.00
▷ Minimum class complexity8.00
▷ Maximum class complexity28.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods52
▷ Static methods1732.69%
▷ Public methods4994.23%
▷ Protected methods00.00%
▷ Private methods35.77%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected