78% topbar-for-genesis

Code Review | Sticky Genesis Topbar

WordPress plugin Sticky Genesis Topbar scored78%from 54 tests.

About plugin

  • Plugin page: topbar-for-genesis
  • Plugin version: 2.3.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.2.2
  • WordPress version: 6.3.1
  • First release: May 4, 2018
  • Latest release: May 28, 2023
  • Number of updates: 68
  • Update frequency: every 27.2 days
  • Top authors: anwerashif (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

100+ active /7,983 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.03MB] [CPU: ▼3.54ms] Passed 4 tests

An overview of server-side resources used by Sticky Genesis Topbar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.17 ▼7.62
Dashboard /wp-admin3.34 ▲0.0344.18 ▼7.10
Posts /wp-admin/edit.php3.39 ▲0.0348.89 ▲1.31
Add New Post /wp-admin/post-new.php5.93 ▲0.0599.77 ▲3.93
Media Library /wp-admin/upload.php3.26 ▲0.0334.81 ▼0.73
Sticky Topbar /wp-admin/admin.php?page=topbar-options3.2342.39

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Sticky Genesis Topbar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8413.97 ▼0.452.42 ▲0.3242.77 ▼7.20
Dashboard /wp-admin2,243 ▲555.24 ▼0.66110.79 ▼2.8538.73 ▼5.95
Posts /wp-admin/edit.php2,124 ▲352.35 ▲0.3237.37 ▼0.2634.78 ▼0.18
Add New Post /wp-admin/post-new.php1,542 ▲323.39 ▼0.01694.16 ▲27.2037.66 ▼16.65
Media Library /wp-admin/upload.php1,422 ▲344.45 ▲0.28101.87 ▲8.2541.98 ▲0.18
Sticky Topbar /wp-admin/admin.php?page=topbar-options4,0352.8864.2847.98

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/topbar-for-genesis/css.php
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: bbgcolor in wp-content/plugins/topbar-for-genesis/css.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/topbar-for-genesis/inc/admin.php:10
    • > PHP Notice
      Undefined variable: hide_social_on_mob in wp-content/plugins/topbar-for-genesis/css.php on line 32
    • > PHP Notice
      Undefined variable: tcolor in wp-content/plugins/topbar-for-genesis/css.php on line 13
    • > PHP Notice
      Undefined variable: t_height in wp-content/plugins/topbar-for-genesis/css.php on line 12
    • > PHP Notice
      Undefined variable: tccolor in wp-content/plugins/topbar-for-genesis/css.php on line 30
    • > PHP Notice
      Undefined variable: bgcolor in wp-content/plugins/topbar-for-genesis/css.php on line 11
    • > PHP Notice
      Undefined variable: tcolor in wp-content/plugins/topbar-for-genesis/css.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/topbar-for-genesis/sticky-genesis-topbar.php:13
    • > PHP Warning
      include(sticky_genesis_topbar_incadmin.php): failed to open stream: No such file or directory in wp-content/plugins/topbar-for-genesis/sticky-genesis-topbar.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: utility bar, genesis, sticky topbar, studiopress, social media icons...

topbar-for-genesis/plugin.php 85% from 13 tests

The main file in "Sticky Genesis Topbar" v. 2.3.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("topbar-for-genesis.php" instead of "plugin.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin8,726 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
SVG2004,634
CSS389282,959
PHP46757750
JavaScript34552219
PO File16868164

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.15
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/ucard.png41.98KB16.25KB▼ 61.30%