89% wp-rest-menu

Code Review | WP REST Menus

WordPress plugin WP REST Menus scored89%from 54 tests.

About plugin

  • Plugin page: wp-rest-menu
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Jul 4, 2018
  • Latest release: Feb 17, 2022
  • Number of updates: 22
  • Update frequency: every 60.2 days
  • Top authors: skapator (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /4,794 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼8.86ms] Passed 4 tests

An overview of server-side resources used by WP REST Menus
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.94 ▼6.89
Dashboard /wp-admin3.37 ▲0.0650.15 ▼4.50
Posts /wp-admin/edit.php3.48 ▲0.1249.11 ▼2.42
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.35 ▼21.63
Media Library /wp-admin/upload.php3.29 ▲0.0641.19 ▲3.98

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP REST Menus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.40 ▼0.351.89 ▼0.4139.49 ▼2.57
Dashboard /wp-admin2,198 ▲185.67 ▲0.0090.70 ▲3.0839.50 ▼6.54
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0034.60 ▼8.8834.87 ▼1.09
Add New Post /wp-admin/post-new.php1,549 ▲423.28 ▲0.17658.11 ▲26.2957.80 ▲5.17
Media Library /wp-admin/upload.php1,391 ▼34.27 ▲0.08102.78 ▼7.7142.48 ▼5.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
Please take inspiration from this readme.txt

wp-rest-menu/wp-rest-menus.php 92% from 13 tests

"WP REST Menus" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-rest-menu.php" instead of "wp-rest-menus.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected284 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP371103284

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods857.14%
▷ Protected methods00.00%
▷ Private methods642.86%
Functions18
▷ Named functions15.56%
▷ Anonymous functions1794.44%
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
There are no PNG files in this plugin