84% crude-menus

Code Review | CRUDE Menus

WordPress plugin CRUDE Menus scored84%from 54 tests.

About plugin

  • Plugin page: crude-menus
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 7, 2018
  • Latest release: Jun 10, 2018
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: RobertGillmer (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /699 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.18ms] Passed 4 tests

This is a short check of server-side resources used by CRUDE Menus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.78 ▼3.03
Dashboard /wp-admin3.34 ▲0.0449.59 ▼2.52
Posts /wp-admin/edit.php3.39 ▲0.0347.99 ▼3.97
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.55 ▼7.21
Media Library /wp-admin/upload.php3.26 ▲0.0339.21 ▲3.10
CRUDE Menus /wp-admin/themes.php?page=crude-menus3.3733.05

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

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

Browser metrics Passed 4 tests

A check of browser resources used by CRUDE Menus
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.29 ▼1.001.73 ▼0.4744.87 ▲2.82
Dashboard /wp-admin2,213 ▲244.86 ▼1.0794.73 ▼23.6439.52 ▼7.55
Posts /wp-admin/edit.php2,093 ▲72.00 ▲0.0140.65 ▲4.8437.67 ▲0.91
Add New Post /wp-admin/post-new.php1,545 ▲2418.66 ▼4.64596.64 ▼96.8462.76 ▲10.68
Media Library /wp-admin/upload.php1,395 ▲134.19 ▲0.01104.43 ▼5.0047.87 ▼0.80
CRUDE Menus /wp-admin/themes.php?page=crude-menus8292.0527.3626.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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 following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crude-menus/inc/general.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crude-menus/inc/options-page.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crude-menus/inc/create-menu.php:155

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
3 plugin tags: create menus, programmitically create menus, menus

crude-menus/crude-menus.php Passed 13 tests

The main PHP file in "CRUDE Menus" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
122 characters long description:
This plugin allows an admin to create navigation menus by simply pasting a list of comma-separated values into a text box.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected229 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP456104182
JavaScript29547

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected