83% wp-app-bar

Code Review | WP App Bar

WordPress plugin WP App Bar scored83%from 54 tests.

About plugin

  • Plugin page: wp-app-bar
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.8
  • WordPress version: 6.3.1
  • First release: Jul 20, 2016
  • Latest release: Apr 18, 2017
  • Number of updates: 6
  • Update frequency: every 52.8 days
  • Top authors: ryscript (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active /2,767 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WP App Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2339.91 ▼0.20
Dashboard /wp-admin3.59 ▲0.2957.25 ▲6.82
Posts /wp-admin/edit.php3.64 ▲0.2955.16 ▼0.38
Add New Post /wp-admin/post-new.php6.11 ▲0.2391.43 ▼3.74
Media Library /wp-admin/upload.php3.45 ▲0.2340.16 ▲3.72

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP App Bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲10313.47 ▼0.832.94 ▲0.9642.89 ▼0.35
Dashboard /wp-admin2,243 ▲525.03 ▼0.86101.97 ▼2.4343.51 ▼0.93
Posts /wp-admin/edit.php2,134 ▲412.29 ▲0.2541.44 ▲0.9336.48 ▲1.26
Add New Post /wp-admin/post-new.php1,543 ▲1017.48 ▼5.57675.87 ▲21.6435.67 ▼31.19
Media Library /wp-admin/upload.php1,422 ▲374.43 ▲0.24102.33 ▼22.0945.53 ▼7.06

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • 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 everything seems fine, this is not 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-app-bar/includes/admin/html-app-bar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-app-bar/includes/admin/ajax-app-bar.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This is the admin screen. Super simple to select and configure each of the 5 functions you can display in the app bar at once.), #2 (This is a screenshot of the app bar in action. It will appear across the bottom of the browser screen for all mobile visitors. One tap to call, open your location in Google maps or any of the other functions you can choose to display.)
The official readme.txt might help

wp-app-bar/wp-app-bar.php 69% from 13 tests

The primary PHP file in "WP App Bar" version 1.5 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.6.0" instead of "4.1")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 214 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin5,173 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS5580273,114
PHP73818961,296
SVG100685
JavaScript4291048
Markdown114030

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.47
Average class complexity34.80
▷ Minimum class complexity2.00
▷ Maximum class complexity134.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes480.00%
Methods70
▷ Static methods1318.57%
▷ Public methods6491.43%
▷ Protected methods22.86%
▷ Private methods45.71%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants110.00%
▷ Class constants990.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.28MB with 0.19MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png89.48KB25.28KB▼ 71.75%
screenshot-2.png200.03KB77.37KB▼ 61.32%