84% hideunhide-menu-for-guestmember

Code Review | Hide/Unhide Menu for Guest/Member

WordPress plugin Hide/Unhide Menu for Guest/Member scored 84% from 54 tests.

About plugin

  • Plugin page: hideunhide-menu-f...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.8
  • WordPress version: 6.3.1
  • First release: Apr 3, 2014
  • Latest release: Jul 19, 2017
  • Number of updates: 7
  • Update frequency: every 171.9 days
  • Top authors: KakiNetwork (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

80+ active / 4,188 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Hide/Unhide Menu for Guest/Member
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0079.23 ▲6.18
Dashboard /wp-admin3.31 ▲0.0078.50 ▼9.81
Posts /wp-admin/edit.php3.36 ▲0.00100.08 ▲15.29
Add New Post /wp-admin/post-new.php5.89 ▲0.00164.84 ▲6.42
Media Library /wp-admin/upload.php3.23 ▲0.0061.83 ▼6.98

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hide/Unhide Menu for Guest/Member
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲3114.59 ▲0.663.11 ▼1.3172.49 ▲1.43
Dashboard /wp-admin2,203 ▲184.92 ▲0.02179.80 ▼16.2190.73 ▲0.37
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0266.67 ▼0.7775.34 ▼14.37
Add New Post /wp-admin/post-new.php1,399 ▲2617.80 ▲0.17926.83 ▼31.6781.76 ▲10.60
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.02184.49 ▲6.5597.50 ▼5.17

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • 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
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hideunhide-menu-for-guestmember/hideunhide.php:10

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (To appear CSS Classess), #2 (To setup CSS Classess)
Please take inspiration from this readme.txt

hideunhide-menu-for-guestmember/hideunhide.php 92% from 13 tests

The entry point to "Hide/Unhide Menu for Guest/Member" version 1.0.3 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hideunhide-menu-for-guestmember.php" instead of "hideunhide.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin21 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP10815
CSS1006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions2
▷ Named functions2100.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
2 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png24.33KB7.92KB▼ 67.45%
screenshot-1.png56.97KB19.20KB▼ 66.29%