89% widgets-in-menu

Code Review | Widgets in Menu for WordPress

WordPress plugin Widgets in Menu for WordPress scored89%from 54 tests.

About plugin

  • Plugin page: widgets-in-menu
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 6.3.1
  • First release: Oct 21, 2014
  • Latest release: Jun 27, 2018
  • Number of updates: 20
  • Update frequency: every 67.3 days
  • Top authors: saurabhshukla (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

10,000+ active /94,796 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.04MB] [CPU: ▼6.19ms] Passed 4 tests

Analyzing server-side resources used by Widgets in Menu for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.97 ▼3.24
Dashboard /wp-admin3.36 ▲0.0149.58 ▼18.13
Posts /wp-admin/edit.php3.41 ▲0.0556.27 ▲6.84
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.38 ▼1.91
Media Library /wp-admin/upload.php3.28 ▲0.0537.65 ▼1.48

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Widgets in Menu for WordPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.10 ▼0.281.93 ▲0.0541.37 ▼2.65
Dashboard /wp-admin2,198 ▲215.64 ▼0.0592.52 ▲0.7742.27 ▼0.07
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.0539.94 ▼4.3935.81 ▼2.97
Add New Post /wp-admin/post-new.php1,526 ▼1517.55 ▼5.81653.99 ▼41.7354.08 ▼3.24
Media Library /wp-admin/upload.php1,403 ▲34.25 ▼0.01103.65 ▼6.6341.03 ▼7.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: menus, custom link, widgets

widgets-in-menu/yawp-wim.php 85% from 13 tests

The main PHP file in "Widgets in Menu for WordPress" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("widgets-in-menu.php" instead of "yawp-wim.php")

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
There were no executable files found in this plugin341 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3104247263
JavaScript213738
PO File171231
JSON1009

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.50
▷ Minimum class complexity7.00
▷ Maximum class complexity26.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected