94% wp-edit-menu

Code Review | WP Edit Menu

WordPress plugin WP Edit Menu scored 94% from 54 tests.

About plugin

  • Plugin page: wp-edit-menu
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.3.2
  • WordPress version: 5.9.2
  • First release: Feb 22, 2017
  • Latest release: Dec 31, 2019
  • Number of updates: 19
  • Update frequency: every 54.7 days
  • Top authors: saurav.rox (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 10,632 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼306.69ms] Passed 4 tests

A check of server-side resources used by WP Edit Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0360.64 ▼1.04
Dashboard /wp-admin3.44 ▲0.0335.90 ▼1.28
Posts /wp-admin/edit.php3.66 ▲0.0239.86 ▼2.63
Add New Post /wp-admin/post-new.php6.90 ▼0.0799.94 ▼1,221.82
Media Library /wp-admin/upload.php3.31 ▲0.0231.17 ▲2.33

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: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP Edit Menu
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,850 ▲12815.86 ▲0.225.73 ▼1.412.44 ▲0.07
Dashboard /wp-admin2,950 ▲896.14 ▼0.05155.33 ▼16.75179.72 ▲17.38
Posts /wp-admin/edit.php2,746 ▲553.27 ▲0.0463.42 ▼6.25212.07 ▲2.00
Add New Post /wp-admin/post-new.php1,702 ▼7716.24 ▼5.21417.02 ▼68.44158.08 ▼7.95
Media Library /wp-admin/upload.php1,749 ▲515.58 ▲0.04156.47 ▲14.44211.62 ▲14.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-edit-menu/includes/class-wpem-main.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: menu items, remove, menu, menu itesm bulk remove

wp-edit-menu/init.php 92% from 13 tests

"WP Edit Menu" version 1.0.2'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: It is recommended to name the main PHP file as the plugin slug ("wp-edit-menu.php" instead of "init.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
There were no executable files found in this plugin137 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP394269
JavaScript14057
CSS10011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin