90% country-flags-for-elementor

Code Review | Country Flags for Elementor

WordPress plugin Country Flags for Elementor scored90%from 54 tests.

About plugin

  • Plugin page: country-flags-for...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Jul 28, 2018
  • Latest release: Jul 16, 2021
  • Number of updates: 11
  • Update frequency: every 99.6 days
  • Top authors: solitweb (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /9,344 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.00MB] [CPU: ▼8.71ms] Passed 4 tests

This is a short check of server-side resources used by Country Flags for Elementor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.31 ▼10.62
Dashboard /wp-admin3.31 ▲0.0046.28 ▼7.40
Posts /wp-admin/edit.php3.36 ▲0.0050.67 ▼0.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.89 ▼15.89
Media Library /wp-admin/upload.php3.23 ▲0.0037.17 ▲0.73

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 527 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Country Flags for Elementor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.77 ▲0.581.71 ▼0.5842.72 ▼2.81
Dashboard /wp-admin2,206 ▲155.83 ▼0.07105.50 ▲2.6044.11 ▲0.80
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0239.24 ▼0.7937.10 ▼1.62
Add New Post /wp-admin/post-new.php1,533 ▲1423.12 ▼0.27641.76 ▼22.3756.34 ▲0.17
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0097.47 ▼11.9846.12 ▼4.00

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: flags, pagebuilder, elementor, flag, country flags

country-flags-for-elementor/country-flags-for-elementor.php Passed 13 tests

"Country Flags for Elementor" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
70 characters long description:
This plugin adds a country flags widget to the Elementor Page Builder.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected37,313 lines of code in 522 files:
LanguageFilesBlank linesComment linesLines of code
SVG5120035,042
CSS4301,576
PHP581377626
PO File1253069

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.22
Average class complexity5.75
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.39
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods34
▷ Static methods25.88%
▷ Public methods2470.59%
▷ Protected methods411.76%
▷ Private methods617.65%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin