89% support-ukraine-floating-flag

Code Review | Support Ukraine - Floating Flag

WordPress plugin Support Ukraine - Floating Flag scored89%from 54 tests.

About plugin

  • Plugin page: support-ukraine-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.1
  • WordPress version: 6.3.1
  • First release: Jul 31, 2023
  • Latest release: Aug 3, 2023
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: tostad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /78 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
Installer ran successfully

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

A check of server-side resources used by Support Ukraine - Floating Flag
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.38 ▼7.74
Dashboard /wp-admin3.31 ▼0.0453.80 ▼12.57
Posts /wp-admin/edit.php3.36 ▲0.0053.79 ▲0.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.73 ▲6.67
Media Library /wp-admin/upload.php3.23 ▲0.0036.00 ▼2.70

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Support Ukraine - Floating Flag
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.43 ▼0.011.83 ▲0.1852.76 ▲12.83
Dashboard /wp-admin2,200 ▲545.81 ▲0.21103.49 ▲7.5038.22 ▼4.21
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0342.06 ▲5.3234.93 ▲1.45
Add New Post /wp-admin/post-new.php1,514 ▼1917.56 ▼5.62653.26 ▲3.3256.46 ▲2.75
Media Library /wp-admin/upload.php1,388 ▼34.22 ▼0.0298.96 ▼3.3642.25 ▼2.14

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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: You can take inspiration from this readme.txt

support-ukraine-floating-flag/support-ukraine.php 85% from 13 tests

"Support Ukraine - Floating Flag" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("support-ukraine-floating-flag.php" instead of "support-ukraine.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 188 characters long)

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
Everything looks great! No dangerous files found in this plugin53 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS10033
PHP131020

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.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 images were found in this plugin