94% simple-menu-delete

Code Review | Simple Menu Delete

WordPress plugin Simple Menu Delete scored 94% from 54 tests.

About plugin

  • Plugin page: simple-menu-delete
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.2.1
  • WordPress version: 5.9.2
  • First release: Sep 15, 2011
  • Latest release: Aug 3, 2012
  • Number of updates: 4
  • Update frequency: every 80.8 days
  • Top authors: codepress (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active / 6,358 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.02MB] [CPU: ▼313.67ms] Passed 4 tests

An overview of server-side resources used by Simple Menu Delete
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.4058.29 ▲35.51
Dashboard /wp-admin3.42 ▲0.0138.71 ▲1.82
Posts /wp-admin/edit.php3.65 ▲0.0140.02 ▼3.36
Add New Post /wp-admin/post-new.php6.89 ▼0.0995.24 ▼1,231.91
Media Library /wp-admin/upload.php3.30 ▲0.0036.59 ▼21.23

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Simple Menu Delete
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,766 ▲1216.20 ▲0.546.03 ▼0.092.23 ▼0.75
Dashboard /wp-admin2,894 ▲406.19 ▲0.09123.14 ▼15.65178.66 ▲9.57
Posts /wp-admin/edit.php2,690 ▲53.25 ▲0.0066.27 ▲0.79152.50 ▲2.59
Add New Post /wp-admin/post-new.php1,637 ▼6120.24 ▼2.15491.08 ▲63.66162.54 ▼25.19
Media Library /wp-admin/upload.php1,692 ▼65.55 ▲0.02162.80 ▲16.09220.00 ▲22.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-menu-delete/plugin.php:35

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The added one-click remove menu item button.) image not found
Please take inspiration from this readme.txt

simple-menu-delete/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Simple Menu Delete" version 0.2
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-menu-delete.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected30 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript141422
PHP19248

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin