84% rusty-top-bar

Code Review | Rusty Top Bar

WordPress plugin Rusty Top Bar scored 84% from 54 tests.

About plugin

  • Plugin page: rusty-top-bar
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.4
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: May 22, 2020
  • Number of updates: 7
  • Update frequency: every 5.4 days
  • Top authors: RustyBadRobot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 566 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.82ms] Passed 4 tests

Analyzing server-side resources used by Rusty Top Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0148.37 ▲8.30
Dashboard /wp-admin3.31 ▲0.0144.57 ▼3.08
Posts /wp-admin/edit.php3.36 ▲0.0146.47 ▼5.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.12 ▲1.17
Media Library /wp-admin/upload.php3.24 ▲0.0135.38 ▲0.44
Rusty Top Bar /wp-admin/tools.php?page=rusty-topbar3.2134.09

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Rusty Top Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.70 ▼0.671.81 ▲0.1042.75 ▲2.50
Dashboard /wp-admin2,210 ▲585.86 ▲0.21107.22 ▲2.8341.55 ▼1.21
Posts /wp-admin/edit.php2,096 ▲42.01 ▲0.0239.39 ▲5.8234.07 ▲0.69
Add New Post /wp-admin/post-new.php1,541 ▼123.25 ▲0.39597.02 ▼64.9259.92 ▲5.47
Media Library /wp-admin/upload.php1,395 ▲74.15 ▼0.0595.25 ▼11.4741.02 ▼6.09
Rusty Top Bar /wp-admin/tools.php?page=rusty-topbar1,0972.2249.1627.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/rusty-top-bar/rusty-topbar.php

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 96% from 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
5 plugin tags: top, message, topbar, notification, bar

rusty-top-bar/rusty-topbar.php 92% from 13 tests

This is the main PHP file of "Rusty Top Bar" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rusty-top-bar.php" instead of "rusty-topbar.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
There were no executable files found in this plugin188 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP210527177
CSS1106
JavaScript1205

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ 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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png18.17KB7.24KB▼ 60.15%
screenshot-1.png31.40KB12.32KB▼ 60.76%