84% uberbar

Code Review | Uberbar

WordPress plugin Uberbar scored84%from 54 tests.

About plugin

  • Plugin page: uberbar
  • Plugin version: 2014.06.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.6.1
  • WordPress version: 6.3.1
  • First release: May 19, 2014
  • Latest release: Sep 12, 2016
  • Number of updates: 10
  • Update frequency: every 84.7 days
  • Top authors: toscho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,106 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.17ms] Passed 4 tests

Server-side resources used by Uberbar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.52 ▼2.48
Dashboard /wp-admin3.34 ▼0.0145.82 ▼15.14
Posts /wp-admin/edit.php3.39 ▲0.0347.07 ▲0.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.34 ▼11.83
Media Library /wp-admin/upload.php3.26 ▲0.0341.93 ▲8.69

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Uberbar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲12113.22 ▼1.081.62 ▼0.2340.92 ▼1.83
Dashboard /wp-admin2,229 ▲415.84 ▲0.9798.08 ▼3.3368.02 ▲29.63
Posts /wp-admin/edit.php2,127 ▲381.98 ▼0.0139.54 ▲0.7933.91 ▼0.17
Add New Post /wp-admin/post-new.php1,702 ▲16922.13 ▼1.14704.23 ▲46.5150.81 ▼7.66
Media Library /wp-admin/upload.php1,414 ▲234.16 ▼0.06112.43 ▲8.6545.56 ▲2.14

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/uberbar/plugin.php:150

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: admin, adminbar, hosting

uberbar/plugin.php 92% from 13 tests

The primary PHP file in "Uberbar" version 2014.06.01 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("uberbar.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected105 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12330105

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity3.50
▷ Minimum method complexity3.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods150.00%
▷ Protected methods00.00%
▷ Private methods150.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png0.39KB0.31KB▼ 21.55%