89% wp-top-navigation

Code Review | WP Top Navigation

WordPress plugin WP Top Navigation scored89%from 54 tests.

About plugin

  • Plugin page: wp-top-navigation
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2
  • WordPress version: 6.3.1
  • First release: Dec 17, 2013
  • Latest release: Apr 24, 2015
  • Number of updates: 12
  • Update frequency: every 41.1 days
  • Top authors: sdellow (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /4,266 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by WP Top Navigation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.60 ▲3.04
Dashboard /wp-admin3.32 ▼0.0347.84 ▼12.87
Posts /wp-admin/edit.php3.37 ▲0.0143.68 ▼8.12
Add New Post /wp-admin/post-new.php5.92 ▲0.0379.52 ▼19.22
Media Library /wp-admin/upload.php3.24 ▲0.0135.20 ▲0.86

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Top 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,821 ▲7513.31 ▼1.291.75 ▲0.1044.57 ▲4.62
Dashboard /wp-admin2,227 ▲364.90 ▼0.99113.31 ▲10.3042.50 ▼0.59
Posts /wp-admin/edit.php2,113 ▲212.09 ▲0.0738.04 ▼4.4532.63 ▼4.51
Add New Post /wp-admin/post-new.php1,531 ▲1117.77 ▼5.38656.64 ▼24.0451.45 ▼3.43
Media Library /wp-admin/upload.php1,406 ▲154.24 ▲0.0396.93 ▼8.3341.51 ▼5.29

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: navigation, scroll, top

wp-top-navigation/wp-top-navigation.php 85% from 13 tests

"WP Top Navigation" version 1.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 219 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin350 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS12183210
JavaScript12455108
PHP195132

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sa.png1.27KB0.30KB▼ 76.60%
trunk/images/sa.png1.27KB0.30KB▼ 76.60%