10% menu-obfuscator

Code Review | Menu Obfuscator

WordPress plugin Menu Obfuscator scored10%from 54 tests.

About plugin

  • Plugin page: menu-obfuscator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 2, 2014
  • Latest release: Mar 10, 2020
  • Number of updates: 17
  • Update frequency: every 129.4 days
  • Top authors: josedasilva (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,738 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/menu-obfuscator/menu-obfuscator.php+18
    Undefined variable: wpdb

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.89ms] Passed 4 tests

This is a short check of server-side resources used by Menu Obfuscator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.433.75 ▼36.06
Dashboard /wp-admin2.05 ▼1.2610.29 ▼40.18
Posts /wp-admin/edit.php2.05 ▼1.314.99 ▼44.78
Add New Post /wp-admin/post-new.php2.05 ▼3.846.35 ▼82.55
Media Library /wp-admin/upload.php2.05 ▼1.185.35 ▼32.98
Menu Obfuscator /wp-admin/options-general.php?page=sw-menuobfuscator2.055.39

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 13 new files
Database: 1 new table, 6 new options
New tables
sw_menuobfuscator
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Menu Obfuscator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.24 ▼1.141.80 ▼0.2541.87 ▼3.15
Dashboard /wp-admin2,214 ▲264.86 ▲0.01123.65 ▲18.9747.50 ▲5.69
Posts /wp-admin/edit.php2,097 ▲82.07 ▲0.0136.39 ▼6.4832.03 ▼5.16
Add New Post /wp-admin/post-new.php1,530 ▲1618.47 ▲0.96624.69 ▼78.1159.09 ▲1.40
Media Library /wp-admin/upload.php1,393 ▲54.18 ▼0.0497.72 ▼9.4643.90 ▼0.43
Menu Obfuscator /wp-admin/options-general.php?page=sw-menuobfuscator8082.0426.0824.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/menu-obfuscator/menu-obfuscator.php+18
    Undefined variable: wpdb
  • Zombie tables detected upon uninstall: 1 table
    • sw_menuobfuscator
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=sw-menuobfuscator
    • > Notice in wp-content/plugins/menu-obfuscator/menu-obfuscator.php+18
    Undefined variable: wpdb
    • > GET request to /wp-admin/options-general.php?page=sw-menuobfuscator
    • > Notice in wp-content/plugins/menu-obfuscator/menu-obfuscator.php+18
    Trying to get property 'prefix' of non-object

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
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/menu-obfuscator/menu-obfuscator.php on line 12
    • > PHP Notice
      Undefined variable: show_message in wp-content/plugins/menu-obfuscator/views/admin_success_page.php on line 2
    • > PHP Notice
      Undefined variable: is_post in wp-content/plugins/menu-obfuscator/views/admin_page.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/menu-obfuscator/menu-obfuscator.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/menu-obfuscator/views/search_form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/menu-obfuscator/views/search_form.php:3
    • > PHP Notice
      Undefined variable: show_message in wp-content/plugins/menu-obfuscator/views/admin_success_page.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/menu-obfuscator/views/admin_success_page.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/menu-obfuscator/views/search_form.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

menu-obfuscator/menu-obfuscator.php Passed 13 tests

Analyzing the main PHP file in "Menu Obfuscator" version 1.0
41 characters long description:
A plugin to obfuscate menus based on user

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 detected273 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP47631228
CSS15018
Markdown18018
JavaScript1509

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods1168.75%
▷ Protected methods00.00%
▷ Private methods531.25%
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

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png10.03KB3.83KB▼ 61.80%
assets/screenshot-2.png60.60KB17.49KB▼ 71.14%
assets/screenshot-1.png29.20KB8.94KB▼ 69.38%
assets/screenshot-3.png25.43KB7.98KB▼ 68.61%