84% wp-nanobar-js

Code Review | WP Nanobar.js

WordPress plugin WP Nanobar.js scored84%from 54 tests.

About plugin

  • Plugin page: wp-nanobar-js
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.8
  • WordPress version: 6.3.1
  • First release: May 22, 2017
  • Latest release: May 22, 2017
  • Number of updates: 11
  • Update frequency: every 0.8 days
  • Top authors: WouterPostmaNL (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /783 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: ▼3.79ms] Passed 4 tests

Analyzing server-side resources used by WP Nanobar.js
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.91 ▼7.48
Dashboard /wp-admin3.32 ▲0.0250.88 ▼4.33
Posts /wp-admin/edit.php3.37 ▲0.0246.55 ▼2.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.60 ▼0.48
Media Library /wp-admin/upload.php3.25 ▲0.0235.36 ▲0.48
WP Nanobar.js /wp-admin/tools.php?page=wp_nanobar.js3.2133.92

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

WP Nanobar.js: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.74 ▲0.544.44 ▲2.5843.52 ▼1.21
Dashboard /wp-admin2,196 ▲255.51 ▼0.1087.36 ▼12.2244.13 ▼0.95
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0138.32 ▲0.8834.34 ▲0.39
Add New Post /wp-admin/post-new.php1,529 ▲123.36 ▼0.12688.79 ▼1.6463.76 ▲5.71
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.03109.78 ▲0.1648.71 ▲3.96
WP Nanobar.js /wp-admin/tools.php?page=wp_nanobar.js7922.0325.1227.17

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-nanobar-js/uninstall.php
    • > /wp-content/plugins/wp-nanobar-js/wp-nanobar.php
    • > /wp-content/plugins/wp-nanobar-js/settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: javascript, loader, loading, nanobar, bar

wp-nanobar-js/wp-nanobar.php 92% from 13 tests

"WP Nanobar.js" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-nanobar-js.php" instead of "wp-nanobar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin177 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11722104
PHP435873

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin