90% copy-nav-menu-items

Code Review | Copy Nav Menu Items

WordPress plugin Copy Nav Menu Items scored90%from 54 tests.

About plugin

  • Plugin page: copy-nav-menu-items
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 6, 2020
  • Latest release: Mar 23, 2023
  • Number of updates: 13
  • Update frequency: every 66.7 days
  • Top authors: rnoakes3rd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,102 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.75ms] Passed 4 tests

An overview of server-side resources used by Copy Nav Menu Items
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.03 ▼2.66
Dashboard /wp-admin3.45 ▲0.1156.71 ▼6.08
Posts /wp-admin/edit.php3.57 ▲0.2150.90 ▼0.00
Add New Post /wp-admin/post-new.php6.04 ▲0.1592.21 ▼10.24
Media Library /wp-admin/upload.php3.38 ▲0.1542.27 ▲3.15
Copy Nav Menu Items /wp-admin/options-general.php?page=copy_nav_menu_items_settings3.5535.60

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
copy_nav_menu_items_version
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Copy Nav Menu Items
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.17 ▼1.184.78 ▲3.1242.27 ▲0.43
Dashboard /wp-admin2,225 ▲285.88 ▲0.05115.05 ▲11.8543.48 ▲1.28
Posts /wp-admin/edit.php2,101 ▲12.02 ▲0.0034.80 ▼3.2032.49 ▼4.70
Add New Post /wp-admin/post-new.php1,548 ▲323.34 ▼0.02670.03 ▼2.8359.88 ▲4.48
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.03102.49 ▼9.4443.56 ▼1.00
Copy Nav Menu Items /wp-admin/options-general.php?page=copy_nav_menu_items_settings1,1822.7549.7449.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • copy_nav_menu_items_version
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: items, item, menu, copy, nav

copy-nav-menu-items/copy-nav-menu-items.php Passed 13 tests

The principal PHP file in "Copy Nav Menu Items" v. 1.1.3 is loaded by WordPress automatically on each request
78 characters long description:
Simple plugin that allows for nav menu items to be copied with a single click.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin4,357 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP224691,7631,848
CSS43731,439
JavaScript439531,064
JSON1006

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity12.55
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes210.00%
▷ Concrete classes1890.00%
▷ Final classes18100.00%
Methods91
▷ Static methods3538.46%
▷ Public methods7481.32%
▷ Protected methods1213.19%
▷ Private methods55.49%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants26
▷ Global constants00.00%
▷ Class constants26100.00%
▷ Public constants26100.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
8 PNG files occupy 0.44MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/debug/images/robert-noakes.png6.28KB5.31KB▼ 15.39%
assets/debug/images/YourWordPressDXP300x600.png136.86KB60.69KB▼ 55.65%
assets/release/images/robert-noakes.png6.28KB5.31KB▼ 15.39%
assets/release/images/noakes-plugins.png8.04KB6.25KB▼ 22.23%
assets/release/images/YourWordPressDXP728x90.png73.03KB33.27KB▼ 54.44%