90% admin-bar-addition-for-woocommerce

Code Review | Admin Bar Addition for WooCommerce

WordPress plugin Admin Bar Addition for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: admin-bar-additio...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2017
  • Latest release: Jul 6, 2023
  • Number of updates: 11
  • Update frequency: every 199.9 days
  • Top authors: algoritmika (81.82%)wpcodefactory (27.27%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,153 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.01MB] [CPU: ▼5.82ms] Passed 4 tests

Analyzing server-side resources used by Admin Bar Addition for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.14 ▼4.02
Dashboard /wp-admin3.32 ▲0.0149.93 ▼1.08
Posts /wp-admin/edit.php3.37 ▲0.0147.46 ▼4.18
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.43 ▼12.99
Media Library /wp-admin/upload.php3.24 ▲0.0136.05 ▼2.07

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Admin Bar Addition for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.15 ▼0.221.92 ▲0.2941.58 ▲1.54
Dashboard /wp-admin2,198 ▲215.65 ▲0.0290.66 ▼1.9840.82 ▼4.16
Posts /wp-admin/edit.php2,097 ▼62.03 ▲0.0239.99 ▼1.6235.98 ▼1.94
Add New Post /wp-admin/post-new.php1,526 ▼017.70 ▲0.18607.30 ▼85.1060.00 ▲2.89
Media Library /wp-admin/upload.php1,397 ▼34.27 ▲0.0999.76 ▼5.3942.96 ▼5.74

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
4 plugin tags: adminbar, admin bar addition, woocommerce, admin bar

admin-bar-addition-for-woocommerce/admin-bar-addition-for-woocommerce.php Passed 13 tests

"Admin Bar Addition for WooCommerce" version 1.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
35 characters long description:
Admin bar addition for WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin385 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP339141385

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin