84% d3-register-menus

Code Review | D3 Register Menus

WordPress plugin D3 Register Menus scored84%from 54 tests.

About plugin

  • Plugin page: d3-register-menus
  • Plugin version: 0.1
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 19, 2023
  • Latest release: Apr 14, 2023
  • Number of updates: 10
  • Update frequency: every 8.6 days
  • Top authors: d3adminnew (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /165 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.93ms] Passed 4 tests

This is a short check of server-side resources used by D3 Register Menus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.49 ▲0.81
Dashboard /wp-admin3.32 ▲0.0248.11 ▼4.00
Posts /wp-admin/edit.php3.37 ▲0.0144.95 ▲0.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.61 ▼9.13
Media Library /wp-admin/upload.php3.24 ▲0.0135.38 ▲1.57
D3 Register Menus /wp-admin/admin.php?page=d3-register-menus3.2130.02
D3 Suite /wp-admin/admin.php?page=d3-suite3.2130.59

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for D3 Register Menus
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.17 ▼0.111.58 ▼0.1142.13 ▲2.94
Dashboard /wp-admin2,222 ▲455.56 ▼0.1588.72 ▼5.7237.58 ▲2.03
Posts /wp-admin/edit.php2,087 ▼132.03 ▲0.0638.09 ▲0.9931.08 ▼7.90
Add New Post /wp-admin/post-new.php1,548 ▲2023.08 ▲0.08611.56 ▼10.8466.01 ▲9.78
Media Library /wp-admin/upload.php1,427 ▲304.18 ▲0.01112.23 ▲15.4048.18 ▲6.96
D3 Register Menus /wp-admin/admin.php?page=d3-register-menus8392.1623.6924.76
D3 Suite /wp-admin/admin.php?page=d3-suite7921.9928.8425.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 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 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
Almost there! Just fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/d3-register-menus/templates/d3-submenu-page-content.php
    • > /wp-content/plugins/d3-register-menus/d3-register-menus.php
    • > /wp-content/plugins/d3-register-menus/templates/d3-suite-page-content.php

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: d3-register-menus, d3

d3-register-menus/d3-register-menus.php Passed 13 tests

The main PHP script in "D3 Register Menus" version 0.1 is automatically included on every request by WordPress
22 characters long description:
Create Menus Locations

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
Good job! No executable or dangerous file extensions detected149 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3222496
PO File1192153

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected