84% css-flags

Code Review | CSS Flags library

WordPress plugin CSS Flags library scored84%from 54 tests.

About plugin

  • Plugin page: css-flags
  • Plugin version: 0.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Jun 18, 2015
  • Latest release: Dec 18, 2016
  • Number of updates: 12
  • Update frequency: every 45.8 days
  • Top authors: PerS (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,279 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by CSS Flags library
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.38 ▼0.85
Dashboard /wp-admin3.31 ▲0.0144.33 ▼6.73
Posts /wp-admin/edit.php3.36 ▲0.0045.75 ▲0.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.34 ▼7.75
Media Library /wp-admin/upload.php3.23 ▲0.0034.88 ▼0.38

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

CSS Flags library: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.25 ▼1.121.75 ▲0.1236.65 ▼3.91
Dashboard /wp-admin2,206 ▲185.82 ▲0.93112.61 ▲9.6441.44 ▼1.52
Posts /wp-admin/edit.php2,092 ▼02.04 ▼0.0044.01 ▲2.3934.53 ▼1.94
Add New Post /wp-admin/post-new.php1,542 ▼018.19 ▼0.18582.91 ▼76.1551.16 ▼3.22
Media Library /wp-admin/upload.php1,382 ▼34.23 ▲0.0495.64 ▼5.2339.94 ▼5.17

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 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 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/css-flags/css-flags.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: link, header

css-flags/css-flags.php Passed 13 tests

The principal PHP file in "CSS Flags library" v. 0.3.0 is loaded by WordPress automatically on each request
73 characters long description:
The plugin has responsive SVG flags for 252 countries. See documentation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected3,665 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods125.00%
▷ Public methods125.00%
▷ Protected methods00.00%
▷ Private methods375.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected