90% recent-post-to-wp-nav-menu

Code Review | Recent Post to WP Nav Menu

WordPress plugin Recent Post to WP Nav Menu scored90%from 54 tests.

About plugin

  • Plugin page: recent-post-to-wp...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-4.9
  • WordPress version: 6.3.1
  • First release: Oct 12, 2016
  • Latest release: Nov 17, 2017
  • Number of updates: 9
  • Update frequency: every 44.6 days
  • Top authors: ankitr90 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,915 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼0.48ms] Passed 4 tests

A check of server-side resources used by Recent Post to WP Nav Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0140.82 ▼1.05
Dashboard /wp-admin3.31 ▲0.0144.86 ▼0.14
Posts /wp-admin/edit.php3.36 ▲0.0044.70 ▲0.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.21 ▼0.00
Media Library /wp-admin/upload.php3.23 ▲0.0033.93 ▼0.75

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Recent Post to WP Nav Menu: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.161.87 ▲0.1943.65 ▼5.31
Dashboard /wp-admin2,209 ▲244.88 ▼0.9996.45 ▼5.6241.37 ▲1.44
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0735.39 ▼4.9735.88 ▲2.03
Add New Post /wp-admin/post-new.php1,514 ▼717.76 ▼5.58622.86 ▼54.5548.83 ▼16.03
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.0297.47 ▼6.1640.16 ▼3.05

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 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
4 plugin tags: latest post link, nav menu, recent post link, latest post in nav menu

recent-post-to-wp-nav-menu/plugin.php 92% from 13 tests

The principal PHP file in "Recent Post to WP Nav Menu" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("recent-post-to-wp-nav-menu.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected106 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42827106

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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