84% child-navigation

Code Review | Child Navigation

WordPress plugin Child Navigation scored84%from 54 tests.

About plugin

  • Plugin page: child-navigation
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2014
  • Latest release: May 12, 2015
  • Number of updates: 13
  • Update frequency: every 36.5 days
  • Top authors: hildende (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,511 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.24ms] Passed 4 tests

This is a short check of server-side resources used by Child Navigation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.79 ▲0.66
Dashboard /wp-admin3.33 ▲0.0267.89 ▲20.43
Posts /wp-admin/edit.php3.38 ▲0.0247.81 ▼1.16
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.82 ▼25.76
Media Library /wp-admin/upload.php3.25 ▲0.0234.50 ▲1.29

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Child Navigation: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.40 ▼0.051.76 ▲0.1044.06 ▲1.44
Dashboard /wp-admin2,209 ▲214.86 ▼0.01104.01 ▲0.3840.34 ▼3.12
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0133.67 ▼1.5634.80 ▼0.36
Add New Post /wp-admin/post-new.php1,528 ▲1123.14 ▲5.31666.96 ▲6.7259.76 ▲0.63
Media Library /wp-admin/upload.php1,385 ▲34.18 ▼0.0694.29 ▼7.2343.34 ▼0.95

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/child-navigation/child-navigation.php:172

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: children, navigation, sub, wp_nav_menu, child...

child-navigation/child-navigation.php Passed 13 tests

This is the main PHP file of "Child Navigation" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
51 characters long description:
Adds support for child navigations to wp_nav_menu()

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
Good job! No executable or dangerous file extensions detected128 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1387128

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity3.67
▷ Minimum method complexity2.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods222.22%
▷ Protected methods777.78%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin