84% pride-bar

Code Review | Pride Bar

WordPress plugin Pride Bar scored84%from 54 tests.

About plugin

  • Plugin page: pride-bar
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Dec 9, 2017
  • Latest release: Oct 19, 2023
  • Number of updates: 94
  • Update frequency: every 22.8 days
  • Top authors: dartiss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,443 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 gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼8.40ms] Passed 4 tests

An overview of server-side resources used by Pride Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1737.62 ▼3.64
Dashboard /wp-admin3.48 ▲0.1447.40 ▼14.96
Posts /wp-admin/edit.php3.54 ▲0.1849.70 ▲5.03
Add New Post /wp-admin/post-new.php6.07 ▲0.1785.46 ▼17.07
Media Library /wp-admin/upload.php3.41 ▲0.1836.38 ▲2.06

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Pride Bar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.211.63 ▼0.0540.68 ▲1.77
Dashboard /wp-admin2,197 ▲195.56 ▼0.0689.92 ▼8.9537.96 ▼2.30
Posts /wp-admin/edit.php2,102 ▲22.03 ▲0.0439.62 ▲3.1135.16 ▲1.71
Add New Post /wp-admin/post-new.php1,528 ▲223.12 ▲0.27654.23 ▲9.6351.62 ▲2.61
Media Library /wp-admin/upload.php1,405 ▲54.18 ▼0.0097.31 ▲1.0242.83 ▼0.55

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

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
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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pride-bar/pride-bar.php:54

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: admin bar, queer, pride, lgbtq, lgbt...

pride-bar/pride-bar.php Passed 13 tests

"Pride Bar" version 1.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
61 characters long description:
🏳️‍🌈 Add an LGBTQIA+ flag design to your admin bar.

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 plugin1,280 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2681401,280

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
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%
Functions13
▷ Named functions13100.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
No PNG images were found in this plugin