84% my-wp-brand

Code Review | My Wp Brand – Hide menu & Hide Plugin

WordPress plugin My Wp Brand – Hide menu & Hide Plugin scored84%from 54 tests.

About plugin

  • Plugin page: my-wp-brand
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Feb 10, 2022
  • Latest release: May 10, 2023
  • Number of updates: 9
  • Update frequency: every 50.7 days
  • Top authors: imw3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /1,866 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.26MB] [CPU: ▼5.00ms] Passed 4 tests

Server-side resources used by My Wp Brand – Hide menu & Hide Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2341.25 ▲3.20
Dashboard /wp-admin3.58 ▲0.2346.86 ▼12.30
Posts /wp-admin/edit.php3.67 ▲0.3147.28 ▲1.64
Add New Post /wp-admin/post-new.php6.25 ▲0.3679.96 ▼12.53
Media Library /wp-admin/upload.php3.52 ▲0.2838.30 ▲5.95
MY WP Brand /wp-admin/options-general.php?page=mwb3.5535.25

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
hide_menu_bh_plugin
can_compress_scripts
menu_order_bh_plugin
widget_theysaidso_widget
hide_top_menu_bh_plugin
hide_sub_menu_bh_plugin
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by My Wp Brand – Hide menu & Hide Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,783 ▲2214.57 ▼0.171.78 ▲0.1543.24 ▲6.06
Dashboard /wp-admin2,189 ▲185.56 ▲0.0386.30 ▼0.1236.15 ▼5.36
Posts /wp-admin/edit.php2,094 ▼32.03 ▲0.0234.97 ▼2.0230.27 ▼4.03
Add New Post /wp-admin/post-new.php1,521 ▼523.13 ▼0.01674.50 ▼11.3754.17 ▼9.60
Media Library /wp-admin/upload.php1,394 ▼34.19 ▼0.0494.88 ▼1.7637.86 ▼9.53
MY WP Brand /wp-admin/options-general.php?page=mwb3,5271.6627.7086.53

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
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-wp-brand/mwb-side-menu.php:533

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in my-wp-brand/assets to your readme.txt
The official readme.txt might help

my-wp-brand/mwb.php 92% from 13 tests

The main PHP file in "My Wp Brand – Hide menu & Hide Plugin" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("my-wp-brand.php" instead of "mwb.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,188 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2252267790
CSS1591321
JavaScript1182277

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity5.29
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin