83% wp-widget-in-navigation

Code Review | WP Widget in Navigation

WordPress plugin WP Widget in Navigation scored83%from 54 tests.

About plugin

  • Plugin page: wp-widget-in-navi...
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2018
  • Latest release: Apr 24, 2023
  • Number of updates: 33
  • Update frequency: every 53.8 days
  • Top authors: yudiz (75.76%)yudizsolutions (27.27%)

Code review

54 tests

User reviews

14 reviews

Install metrics

4,000+ active /29,536 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.49ms] Passed 4 tests

An overview of server-side resources used by WP Widget in Navigation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0835.81 ▼7.66
Dashboard /wp-admin3.39 ▲0.0845.12 ▼4.86
Posts /wp-admin/edit.php3.44 ▲0.0849.83 ▲0.72
Add New Post /wp-admin/post-new.php5.97 ▲0.0892.27 ▼15.90
Media Library /wp-admin/upload.php3.31 ▲0.0834.61 ▼1.54

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Widget in Navigation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.61 ▼0.781.58 ▼0.1440.72 ▲1.64
Dashboard /wp-admin2,206 ▲214.85 ▼1.01109.74 ▲2.0440.99 ▲0.73
Posts /wp-admin/edit.php2,086 ▼62.05 ▲0.0439.39 ▼1.4334.90 ▼1.69
Add New Post /wp-admin/post-new.php1,542 ▼018.45 ▲0.24631.91 ▼22.1287.07 ▲30.37
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0294.48 ▼4.3341.57 ▼0.95

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

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-widget-in-navigation/wp-widget-navigation.php:23

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

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid url: ""
  • Stable tag: Empty value
  • License: Empty value
The official readme.txt is a good inspiration

wp-widget-in-navigation/wp-widget-navigation.php 85% from 13 tests

The main file in "WP Widget in Navigation" v. 3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-widget-in-navigation.php" instead of "wp-widget-navigation.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
Success! There were no dangerous files found in this plugin1,440 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript326292979
PHP3141269379
CSS3122082

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity20.00
▷ Minimum class complexity7.00
▷ Maximum class complexity33.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
12 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ie6/borderBottomLeft.png0.21KB0.20KB▼ 4.19%
css/images/ie6/borderTopRight.png0.21KB0.20KB▼ 2.34%
css/images/ie6/borderMiddleRight.png0.11KB0.10KB▼ 7.41%
css/images/ie6/borderMiddleLeft.png0.11KB0.10KB▼ 7.41%
css/images/ie6/borderTopLeft.png0.21KB0.20KB▼ 4.63%