90% sidebar-menu-items

Code Review | Sidebar Menu Items

WordPress plugin Sidebar Menu Items scored90%from 54 tests.

About plugin

  • Plugin page: sidebar-menu-items
  • Plugin version: 0.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Feb 29, 2020
  • Latest release: Jul 21, 2021
  • Number of updates: 26
  • Update frequency: every 19.7 days
  • Top authors: mottodesignstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,818 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.99ms] Passed 4 tests

A check of server-side resources used by Sidebar Menu Items
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.75 ▼0.85
Dashboard /wp-admin3.37 ▲0.0650.58 ▼1.20
Posts /wp-admin/edit.php3.48 ▲0.1249.53 ▼2.27
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.48 ▼11.20
Media Library /wp-admin/upload.php3.29 ▲0.0636.06 ▼1.28

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Sidebar Menu Items
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.68 ▼0.942.18 ▲0.3646.13 ▲3.10
Dashboard /wp-admin2,203 ▲125.83 ▲0.95100.32 ▼2.1740.63 ▼1.02
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0659.39 ▲19.4249.07 ▲9.68
Add New Post /wp-admin/post-new.php1,533 ▲522.97 ▲4.85670.66 ▲28.8952.37 ▼8.52
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0293.65 ▼12.0144.17 ▼4.02

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: mega menu, sidebar, nav menu, menu items, widget menu...

sidebar-menu-items/sidebar-menu-items.php Passed 13 tests

The entry point to "Sidebar Menu Items" version 0.1.6 is a PHP file that has certain tags in its header comment area
36 characters long description:
Use sidebar areas within your menus.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin538 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP19203898538

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods52
▷ Static methods47.69%
▷ Public methods3669.23%
▷ Protected methods00.00%
▷ Private methods1630.77%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.67MB with 0.48MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
sidebar-menu-items/.wordpress-org/screenshot-1.png211.44KB55.33KB▼ 73.83%
sidebar-menu-items/.wordpress-org/screenshot-2.png283.39KB78.94KB▼ 72.15%
sidebar-menu-items/.wordpress-org/banner-772x250.png156.42KB41.77KB▼ 73.30%
sidebar-menu-items/.wordpress-org/icon-256x256.png30.54KB8.60KB▼ 71.85%