78% master-bar

Code Review | Master Bar

WordPress plugin Master Bar scored78%from 54 tests.

About plugin

  • Plugin page: master-bar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2014
  • Latest release: Jul 16, 2014
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: maurolopes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,381 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.24MB] [CPU: ▼4.37ms] Passed 4 tests

An overview of server-side resources used by Master Bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.00 ▲2.5440.01 ▼0.57
Dashboard /wp-admin3.54 ▲0.2449.57 ▼2.19
Posts /wp-admin/edit.php3.59 ▲0.2451.19 ▼1.47
Add New Post /wp-admin/post-new.php6.13 ▲0.2490.90 ▼13.24
Media Library /wp-admin/upload.php3.46 ▲0.2445.78 ▲9.90
BAR Builder /wp-admin/admin.php?page=masterbar_options&tab=06.1849.94
Shortcode /wp-admin/admin.php?page=masterbar_options&tab=26.1950.52
Select Places /wp-admin/admin.php?page=masterbar_options&tab=16.1950.75
Import / Export /wp-admin/admin.php?page=masterbar_options&tab=import_export_default6.1949.98

Server storage [IO: ▲4.77MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • The plugin illegally modified 1 file (145.03KB) outside of "wp-content/plugins/master-bar/" and "wp-content/uploads/"
    • (new file) wp-content/redux/google-fonts/googlefonts.json
Filesystem: 275 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
redux-framework-tracking
widget_recent-comments
can_compress_scripts
masterbar_settings
db_upgraded
masterbar_settings-transients
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Master Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲21813.86 ▼0.8010.08 ▲8.0645.57 ▼0.59
Dashboard /wp-admin2,258 ▲785.59 ▼0.0892.45 ▼4.4138.62 ▼2.14
Posts /wp-admin/edit.php2,160 ▲572.03 ▲0.0338.09 ▼4.6636.43 ▼1.11
Add New Post /wp-admin/post-new.php1,582 ▲5623.02 ▼0.05679.35 ▲3.4558.53 ▼0.92
Media Library /wp-admin/upload.php1,457 ▲574.14 ▼0.06110.50 ▲11.4246.81 ▼3.49
BAR Builder /wp-admin/admin.php?page=masterbar_options&tab=02,8435.85152.3151.75
Shortcode /wp-admin/admin.php?page=masterbar_options&tab=21,9554.6886.4034.57
Select Places /wp-admin/admin.php?page=masterbar_options&tab=11,9614.7379.0535.47
Import / Export /wp-admin/admin.php?page=masterbar_options&tab=import_export_default1,9614.7176.6533.93

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • db_upgraded
    • can_compress_scripts
    • masterbar_settings
    • widget_recent-comments
    • widget_recent-posts
    • redux-framework-tracking
    • widget_theysaidso_widget
    • masterbar_settings-transients
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=masterbar_options&tab=2
    • > request to
    • > Warning in wp-content/plugins/master-bar/admin/redux-framework/ReduxCore/extensions/customizer/extension_customizer.php+382
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=masterbar_options&tab=2
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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 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/master-bar/admin/redux-framework/ReduxCore/inc/fields/select/elusive-icons.php:312

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Front side), #2 (Admin side i), #3 (Admin side ii), #4 (Admin side iii), #5 (Admin side iv)
The official readme.txt is a good inspiration

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

The primary PHP file in "Master Bar" version 1.0 is used by WordPress to initiate all plugin functionality
44 characters long description:
Display a bar on top of your wordpress site.

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
There were no executable files found in this plugin29,708 lines of code in 194 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript832,0041,6489,353
PHP532,0873,4437,825
JSON4005,025
LESS152991913,171
CSS222581142,668
Markdown42850924
SVG100309
Sass1010288
XML11090
Bourne Shell124055

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity39.28
▷ Minimum class complexity1.00
▷ Maximum class complexity743.00
Average method complexity7.07
▷ Minimum method complexity1.00
▷ Maximum method complexity90.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes00.00%
▷ Concrete classes46100.00%
▷ Final classes00.00%
Methods290
▷ Static methods3411.72%
▷ Public methods26390.69%
▷ Protected methods00.00%
▷ Private methods279.31%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
36 PNG files occupy 1.83MB with 1.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png324.79KB113.59KB▼ 65.03%
admin/redux-framework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
admin/redux-framework/ReduxCore/assets/img/2cr.png2.92KB0.24KB▼ 91.69%
admin/redux-framework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
admin/redux-framework/ReduxCore/assets/img/2-col-portfolio.png1.02KB0.15KB▼ 85.07%