84% network-primary-nav

Code Review | Network Primary Nav

WordPress plugin Network Primary Nav scored84%from 54 tests.

About plugin

  • Plugin page: network-primary-nav
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: Feb 5, 2013
  • Latest release: Feb 5, 2013
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: markotom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /815 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.40ms] Passed 4 tests

An overview of server-side resources used by Network Primary Nav
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.61 ▲2.72
Dashboard /wp-admin3.31 ▼0.0348.67 ▼10.54
Posts /wp-admin/edit.php3.36 ▲0.0147.24 ▼0.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.21 ▼25.53
Media Library /wp-admin/upload.php3.23 ▲0.0034.66 ▼9.09

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

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

Browser metrics Passed 4 tests

Network Primary Nav: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.72 ▲0.142.12 ▲0.4143.45 ▲1.93
Dashboard /wp-admin2,195 ▲155.55 ▼0.0686.10 ▼5.0037.93 ▼10.06
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0234.35 ▼2.9834.47 ▲2.16
Add New Post /wp-admin/post-new.php1,526 ▼1123.69 ▲5.41657.64 ▲8.2259.17 ▼3.27
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.1598.87 ▼23.1847.38 ▼0.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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/network-primary-nav/network-primary-nav.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Contributors: Contributors not specified
The official readme.txt might help

network-primary-nav/network-primary-nav.php Passed 13 tests

The primary PHP file in "Network Primary Nav" version 1.0 is used by WordPress to initiate all plugin functionality
49 characters long description:
Add primary nav of parent blog to all child blogs

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181419

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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