84% advanced-disable-parent-menu-link

Code Review | Advanced Disable Parent Menu Link

WordPress plugin Advanced Disable Parent Menu Link scored84%from 54 tests.

About plugin

  • Plugin page: advanced-disable-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Jan 24, 2013
  • Latest release: Jan 24, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: kapilchugh (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

900+ active /11,529 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Advanced Disable Parent Menu Link
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.50 ▼5.30
Dashboard /wp-admin3.31 ▲0.0043.28 ▼2.43
Posts /wp-admin/edit.php3.36 ▲0.0044.83 ▼0.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.88 ▼4.23
Media Library /wp-admin/upload.php3.23 ▲0.0032.09 ▼1.22

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Advanced Disable Parent Menu Link: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲17213.66 ▼0.645.51 ▲3.8438.39 ▼6.09
Dashboard /wp-admin2,206 ▲244.92 ▼0.0199.98 ▼1.0638.33 ▼6.99
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0140.63 ▲1.9735.28 ▼1.29
Add New Post /wp-admin/post-new.php1,538 ▼423.28 ▲4.89674.11 ▲65.1456.45 ▲4.40
Media Library /wp-admin/upload.php1,391 ▲34.15 ▼0.0996.42 ▲0.7343.48 ▲0.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-disable-parent-menu-link/advanced-disable-parent-menu-link.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Parent menu link is disabled)
The official readme.txt might help

advanced-disable-parent-menu-link/advanced-disable-parent-menu-link.php Passed 13 tests

The main PHP file in "Advanced Disable Parent Menu Link" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
54 characters long description:
A plugin which allows you to disable parent menu link.

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 detected24 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12724

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png18.60KB7.11KB▼ 61.78%