89% we-stand-with-ukraine-banner

Code Review | Stand with Ukraine Banner

WordPress plugin Stand with Ukraine Banner scored89%from 54 tests.

About plugin

  • Plugin page: we-stand-with-ukr...
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.9.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2022
  • Latest release: Mar 9, 2022
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: qlstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /628 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
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.93ms] Passed 4 tests

Server-side resources used by Stand with Ukraine Banner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.68 ▼2.96
Dashboard /wp-admin3.31 ▼0.0448.75 ▼19.28
Posts /wp-admin/edit.php3.36 ▲0.0044.03 ▼4.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.37 ▼9.16
Media Library /wp-admin/upload.php3.23 ▲0.0039.10 ▲2.60

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Stand with Ukraine Banner: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.20 ▼0.181.82 ▼0.0344.05 ▲0.86
Dashboard /wp-admin2,195 ▲155.62 ▼0.0896.36 ▲0.4143.15 ▼4.52
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0536.83 ▼4.3635.54 ▼1.37
Add New Post /wp-admin/post-new.php1,526 ▼517.63 ▼5.60619.37 ▼65.8253.50 ▼2.97
Media Library /wp-admin/upload.php1,397 ▲64.20 ▼0.07102.29 ▲2.4049.49 ▲5.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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 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
No browser issues were found

Optimizations

Plugin configuration 90% 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
4 plugin tags: support, plugin, anner, ukraine

we-stand-with-ukraine-banner/stand-with-ukraine.php 77% from 13 tests

Analyzing the main PHP file in "Stand with Ukraine Banner" version 1.0.8
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("we-stand-with-ukraine-banner.php" instead of "stand-with-ukraine.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
Success! There were no dangerous files found in this plugin730 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP14354437687
Markdown224042
YAML1001

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.48
Average class complexity7.20
▷ Minimum class complexity2.00
▷ Maximum class complexity21.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes220.00%
Methods41
▷ Static methods1946.34%
▷ Public methods3892.68%
▷ Protected methods00.00%
▷ Private methods37.32%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.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
No PNG files were detected