78% yelp-bar

Code Review | Yelp Bar

WordPress plugin Yelp Bar scored 78% from 54 tests.

About plugin

  • Plugin page: yelp-bar
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Apr 7, 2011
  • Latest release: Jun 16, 2012
  • Number of updates: 10
  • Update frequency: every 43.6 days
  • Top authors: Noel_Tock (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

80+ active / 9,162 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.24ms] Passed 4 tests

An overview of server-side resources used by Yelp Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0435.25 ▼20.09
Dashboard /wp-admin3.35 ▲0.0543.82 ▼1.43
Posts /wp-admin/edit.php3.47 ▲0.1146.00 ▲0.49
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.37 ▼7.92
Media Library /wp-admin/upload.php3.28 ▲0.0434.68 ▲0.99
Yelp Bar /wp-admin/options-general.php?page=themeforce_yelpbar3.2227.01

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
themeforce_yelpbar_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Yelp Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲14513.57 ▼0.747.91 ▲5.8043.61 ▼3.18
Dashboard /wp-admin2,212 ▲265.79 ▲0.86104.37 ▼14.8841.34 ▼3.14
Posts /wp-admin/edit.php2,095 ▲32.01 ▼0.0338.71 ▲2.2735.18 ▲3.00
Add New Post /wp-admin/post-new.php1,521 ▼1217.60 ▼5.53673.81 ▼0.4755.47 ▲3.84
Media Library /wp-admin/upload.php1,394 ▲34.24 ▼0.0693.46 ▼6.2643.27 ▼2.01
Yelp Bar /wp-admin/options-general.php?page=themeforce_yelpbar9592.1825.4946.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=themeforce_yelpbar
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=themeforce_yelpbar
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=themeforce_yelpbar
    • > Notice in wp-content/plugins/yelp-bar/yelpbar.php+151
    Undefined index: setting_api
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=themeforce_yelpbar
    • > Notice in wp-content/plugins/yelp-bar/yelpbar.php+157
    Undefined index: setting_phone

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
  • 1× 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/yelp-bar/yelpbar.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Screenshot of Website Display (as you can see, theme design is irrelevant)), #2 (Screenshot of Setting & API status)
You can take inspiration from this readme.txt

yelp-bar/yelpbar.php 92% from 13 tests

The main file in "Yelp Bar" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yelp-bar.php" instead of "yelpbar.php")

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
Everything looks great! No dangerous files found in this plugin310 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24953215
CSS220295

PHP code Passed 2 tests

A short review 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.11
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.32MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/unactive.png1.79KB0.86KB▼ 51.83%
images/info.png3.28KB1.91KB▼ 41.70%
screenshot-2.png74.84KB27.73KB▼ 62.95%
images/active.png1.85KB0.86KB▼ 53.41%
images/neutral.png1.83KB0.86KB▼ 53.04%