84% woo-align-buttons

Code Review | Woo Align Buttons

WordPress plugin Woo Align Buttons scored84%from 54 tests.

About plugin

  • Plugin page: woo-align-buttons
  • Plugin version: 3.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 3, 2017
  • Latest release: Oct 22, 2023
  • Number of updates: 76
  • Update frequency: every 30.3 days
  • Top authors: 320up (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

4,000+ active /72,546 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
Install script ran successfully

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

Server-side resources used by Woo Align Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0544.75 ▲6.79
Dashboard /wp-admin3.35 ▲0.0041.30 ▼19.34
Posts /wp-admin/edit.php3.46 ▲0.1158.98 ▲13.81
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.98 ▼14.45
Media Library /wp-admin/upload.php3.27 ▲0.0431.80 ▼0.74

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Align Buttons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲14913.47 ▼1.087.84 ▲6.3039.15 ▲0.18
Dashboard /wp-admin2,192 ▲125.62 ▼0.0493.60 ▲5.8042.35 ▲4.85
Posts /wp-admin/edit.php2,103 ▲32.03 ▼0.0147.08 ▲12.3741.05 ▲5.84
Add New Post /wp-admin/post-new.php1,526 ▼023.48 ▼0.02593.94 ▼73.3347.21 ▲0.12
Media Library /wp-admin/upload.php1,400 ▼04.17 ▲0.0092.48 ▼3.3240.70 ▼4.70

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
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woo-align-buttons/public/partials/woo-align-public-display.php
    • > /wp-content/plugins/woo-align-buttons/admin/partials/woo-align-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: buttons, align, woocommerce

woo-align-buttons/woo-align.php 85% from 13 tests

Analyzing the main PHP file in "Woo Align Buttons" version 3.7.0
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-align-buttons.php" instead of "woo-align.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin383 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP12111517171
JavaScript3255166
PO File2101446
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin