84% ipgp-user-country-flag

Code Review | Ipgp User Country Flag

WordPress plugin Ipgp User Country Flag scored84%from 54 tests.

About plugin

  • Plugin page: ipgp-user-country...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2011
  • Latest release: Feb 3, 2023
  • Number of updates: 18
  • Update frequency: every 239.3 days
  • Top authors: thedark (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /6,915 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.00MB] [CPU: ▼0.24ms] Passed 4 tests

Server-side resources used by Ipgp User Country Flag
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0138.56 ▼7.75
Dashboard /wp-admin3.31 ▲0.0146.08 ▼0.97
Posts /wp-admin/edit.php3.36 ▲0.0046.51 ▲4.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.85 ▲8.24
Media Library /wp-admin/upload.php3.23 ▲0.0035.69 ▲2.84
IPGP User Country Flag /wp-admin/options-general.php?page=ipgpucf-adminpage3.2029.78

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Ipgp User Country Flag
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.19 ▼1.171.96 ▲0.3341.00 ▼7.91
Dashboard /wp-admin2,210 ▲254.86 ▼0.99109.80 ▲11.0644.92 ▲1.36
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0939.06 ▲2.1134.04 ▲0.18
Add New Post /wp-admin/post-new.php1,536 ▼622.64 ▲4.22603.93 ▲4.4946.32 ▼9.33
Media Library /wp-admin/upload.php1,386 ▲14.21 ▲0.0293.49 ▼1.1539.82 ▼1.75
IPGP User Country Flag /wp-admin/options-general.php?page=ipgpucf-adminpage7692.0523.7723.70

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ipgp-user-country-flag/ipgp-flag.php:66

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === ipgp-user-country-flag === )
You can take inspiration from this readme.txt

ipgp-user-country-flag/ipgp-flag.php 92% from 13 tests

The primary PHP file in "Ipgp User Country Flag" version 1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ipgp-user-country-flag.php" instead of "ipgp-flag.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 plugin55 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1431055

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions6
▷ Named functions6100.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
There are no PNG files in this plugin