90% badger

Code Review | Badger

WordPress plugin Badger scored90%from 54 tests.

About plugin

  • Plugin page: badger
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: May 14, 2017
  • Latest release: Feb 21, 2023
  • Number of updates: 19
  • Update frequency: every 111.0 days
  • Top authors: numeeja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

Analyzing server-side resources used by Badger
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.63 ▼4.87
Dashboard /wp-admin3.33 ▼0.0243.61 ▼16.90
Posts /wp-admin/edit.php3.38 ▲0.0244.33 ▼1.44
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.00 ▼14.85
Media Library /wp-admin/upload.php3.25 ▲0.0234.66 ▼2.37

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
cc_badger
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Badger
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.18 ▼1.374.47 ▲2.6041.98 ▼6.59
Dashboard /wp-admin2,209 ▲215.91 ▲1.0497.68 ▼17.1436.49 ▼7.68
Posts /wp-admin/edit.php2,086 ▼32.06 ▲0.0335.36 ▼2.6132.64 ▲0.54
Add New Post /wp-admin/post-new.php1,542 ▲818.28 ▼4.80613.76 ▼54.2854.33 ▼0.42
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0397.13 ▼8.3641.46 ▼2.57

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 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 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
Looking good! No server-side errors or output on direct access of PHP files

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 Passed 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: nag, title, blink, tab, alert

badger/badger.php Passed 13 tests

The main file in "Badger" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
64 characters long description:
Change the browser tab title when another browser tab is active.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin160 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35789136
JavaScript15024

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin