84% standwithukraine

Code Review | Stand With Ukraine

WordPress plugin Stand With Ukraine scored84%from 54 tests.

About plugin

  • Plugin page: standwithukraine
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 9, 2022
  • Latest release: Mar 22, 2022
  • Number of updates: 12
  • Update frequency: every 1.1 days
  • Top authors: imsadhappy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /492 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Analyzing server-side resources used by Stand With Ukraine
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.74 ▲3.26
Dashboard /wp-admin3.31 ▲0.0145.48 ▼3.17
Posts /wp-admin/edit.php3.36 ▲0.0147.41 ▲7.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.62 ▼9.44
Media Library /wp-admin/upload.php3.24 ▲0.0133.46 ▲0.13

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Stand With Ukraine: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲13313.63 ▼0.921.60 ▼0.1348.40 ▲0.03
Dashboard /wp-admin2,222 ▲345.83 ▲0.94102.87 ▼11.9239.73 ▼7.60
Posts /wp-admin/edit.php2,102 ▲131.99 ▼0.0634.83 ▼4.5233.63 ▼1.13
Add New Post /wp-admin/post-new.php1,555 ▲1323.26 ▲5.01669.36 ▲54.6557.75 ▲4.84
Media Library /wp-admin/upload.php1,398 ▲74.25 ▲0.0898.12 ▲2.2541.07 ▼0.14

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/standwithukraine/templates/text.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: ukraine, help ukraine, stand with ukraine, standwithukraine

standwithukraine/stand-with-ukraine.php 85% from 13 tests

The entry point to "Stand With Ukraine" version 1.0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("standwithukraine.php" instead of "stand-with-ukraine.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin471 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP44958387
PO File124284

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.73
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%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/notice_right-preview.png10.93KB4.80KB▼ 56.07%
assets/notice_left-preview.png10.86KB4.85KB▼ 55.38%
assets/line_bottom-preview.png8.32KB4.06KB▼ 51.23%
assets/line_top-preview.png8.42KB3.87KB▼ 54.09%