84% oh-my-bar

Code Review | Oh My Bar

WordPress plugin Oh My Bar scored84%from 54 tests.

About plugin

  • Plugin page: oh-my-bar
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 30, 2022
  • Latest release: Jul 30, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: mobeen-abdullah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /248 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.69ms] Passed 4 tests

A check of server-side resources used by Oh My Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.99 ▼3.02
Dashboard /wp-admin3.35 ▲0.0549.84 ▼0.10
Posts /wp-admin/edit.php3.40 ▲0.0548.38 ▼2.71
Add New Post /wp-admin/post-new.php5.95 ▲0.0788.33 ▼8.92
Media Library /wp-admin/upload.php3.27 ▲0.0540.66 ▲3.94

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Oh My Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,001 ▲24013.58 ▼0.778.39 ▲6.8441.58 ▲0.23
Dashboard /wp-admin2,321 ▲1505.67 ▲0.1096.08 ▲10.7543.80 ▲1.58
Posts /wp-admin/edit.php2,226 ▲1232.14 ▲0.0842.01 ▲1.0736.55 ▲0.02
Add New Post /wp-admin/post-new.php1,636 ▲11023.11 ▲0.15676.93 ▲19.5739.25 ▼19.21
Media Library /wp-admin/upload.php1,526 ▲1264.50 ▲0.2998.29 ▼3.1942.25 ▲2.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oh-my-bar/public/inc/oh-my-bar-public-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oh-my-bar/admin/inc/class-read-bar.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oh-my-bar/admin/inc/class-menu.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: bar, notification bar, floating bar, sticky bar, top bar

oh-my-bar/oh-my-bar.php 92% from 13 tests

The primary PHP file in "Oh My Bar" version 0.1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 177 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,832 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP13149630575
CSS4631437
JavaScript480113417
Sass1198387
Markdown17016

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.80
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3687.80%
▷ Protected methods00.00%
▷ Private methods512.20%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin