84% country-flags

Code Review | Country Flags

WordPress plugin Country Flags scored 84% from 54 tests.

About plugin

  • Plugin page: country-flags
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2.10+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.2.2
  • WordPress version: 6.3.1
  • First release: Oct 16, 2018
  • Latest release: Sep 7, 2019
  • Number of updates: 8
  • Update frequency: every 40.8 days
  • Top authors: pbimal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,145 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲0.52ms] Passed 4 tests

An overview of server-side resources used by Country Flags
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.80 ▲0.53
Dashboard /wp-admin3.31 ▲0.0044.02 ▲0.62
Posts /wp-admin/edit.php3.36 ▲0.0045.79 ▼0.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.50 ▲13.06
Media Library /wp-admin/upload.php3.23 ▲0.0035.03 ▲1.74

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Country Flags
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.29 ▼0.071.55 ▼0.0242.44 ▼2.92
Dashboard /wp-admin2,203 ▼35.83 ▼0.0094.00 ▲0.9637.16 ▲1.09
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0339.31 ▼1.1634.61 ▼0.38
Add New Post /wp-admin/post-new.php1,539 ▲2023.14 ▲0.03676.57 ▲28.5461.91 ▲5.18
Media Library /wp-admin/upload.php1,382 ▼94.16 ▼0.0497.50 ▼3.1942.40 ▼5.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/country-flags/country-flags.php:299

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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 your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (flag), #2 (shortcode usage)
You can look at the official readme.txt

country-flags/country-flags.php 92% from 13 tests

"Country Flags" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 249 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected281 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1612281

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions1
▷ Named functions1100.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