84% smarter-navigation

Code Review | Smarter Navigation

WordPress plugin Smarter Navigation scored84%from 54 tests.

About plugin

  • Plugin page: smarter-navigation
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5
  • WordPress version: 6.3.1
  • First release: Feb 18, 2009
  • Latest release: Sep 19, 2015
  • Number of updates: 55
  • Update frequency: every 43.7 days
  • Top authors: scribu (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

600+ active /18,310 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.04MB] [CPU: ▼1.34ms] Passed 4 tests

This is a short check of server-side resources used by Smarter Navigation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0446.06 ▲6.84
Dashboard /wp-admin3.35 ▲0.0444.45 ▼3.42
Posts /wp-admin/edit.php3.46 ▲0.1047.64 ▼1.62
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.96 ▼0.40
Media Library /wp-admin/upload.php3.27 ▲0.0434.60 ▲0.09

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smarter Navigation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.78 ▼0.601.67 ▼0.5040.14 ▼4.14
Dashboard /wp-admin2,206 ▲154.86 ▼1.02110.26 ▲7.7240.49 ▼8.08
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0340.46 ▲0.1935.91 ▼0.16
Add New Post /wp-admin/post-new.php1,547 ▲618.32 ▼0.10614.47 ▼17.1762.81 ▲12.37
Media Library /wp-admin/upload.php1,382 ▼34.17 ▼0.1094.63 ▼4.3042.76 ▼0.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smarter-navigation/main.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: referrer, previous, next, navigation

smarter-navigation/main.php 92% from 13 tests

The entry point to "Smarter Navigation" version 1.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("smarter-navigation.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected197 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27827197

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods15100.00%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
PNG images were not found in this plugin