94% dynamic-latest-post-in-nav-menu

Code Review | Dynamic Latest Post in Nav Menu

WordPress plugin Dynamic Latest Post in Nav Menu scored 94% from 54 tests.

About plugin

  • Plugin page: dynamic-latest-po...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.3.1
  • WordPress version: 5.8.1
  • First release: Mar 26, 2014
  • Latest release: Nov 12, 2015
  • Number of updates: 11
  • Update frequency: every 54.3 days
  • Top authors: hijiri (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active / 4,551 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Dynamic Latest Post in Nav Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1438.52 ▲9.00
Dashboard /wp-admin3.08 ▲0.0350.25 ▼3.42
Posts /wp-admin/edit.php3.14 ▲0.0348.17 ▼0.32
Add New Post /wp-admin/post-new.php5.44 ▲0.0195.21 ▼692.50
Media Library /wp-admin/upload.php3.03 ▲0.0337.16 ▼1.22

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Dynamic Latest Post in Nav Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.83 ▲0.1211.27 ▲0.7245.59 ▼3.28
Dashboard /wp-admin2,970 ▲365.90 ▼0.17169.10 ▲7.93111.35 ▼1.31
Posts /wp-admin/edit.php2,739 ▼02.83 ▲0.1175.61 ▲2.6488.38 ▼5.60
Add New Post /wp-admin/post-new.php1,672 ▼1118.94 ▲0.24414.03 ▲9.13111.65 ▼1.64
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.01162.12 ▼41.43110.53 ▼13.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/dynamic-latest-post-in-nav-menu/dynamic-latest-post-in-nav-menu.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
1 plugin tags: nav menu

dynamic-latest-post-in-nav-menu/dynamic-latest-post-in-nav-menu.php Passed 13 tests

The principal PHP file in "Dynamic Latest Post in Nav Menu" v. 1.1.1 is loaded by WordPress automatically on each request
67 characters long description:
Add Custom Post Type's Dynamic Latest Post and Archive to Nav Menu.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin175 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12315140
Markdown114019
PO File12416

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 code0.24
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.17
▷ 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%
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin