84% geodatasource-country-region-dropdown

Code Review | GeoDataSource Country Region DropDown

WordPress plugin GeoDataSource Country Region DropDown scored84%from 54 tests.

About plugin

  • Plugin page: geodatasource-cou...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2017
  • Latest release: Nov 3, 2022
  • Number of updates: 18
  • Update frequency: every 100.1 days
  • Top authors: geodatasource (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,804 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by GeoDataSource Country Region DropDown
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.98 ▲2.36
Dashboard /wp-admin3.31 ▲0.0153.64 ▲1.39
Posts /wp-admin/edit.php3.36 ▲0.0150.39 ▼5.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.78 ▼15.80
Media Library /wp-admin/upload.php3.23 ▲0.0138.42 ▲3.15
GeoDataSource Country Region DropDown /wp-admin/options-general.php?page=geodatasource-country-region-dropdown3.2032.61

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

GeoDataSource Country Region DropDown: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.28 ▼0.072.07 ▲0.2644.47 ▲0.54
Dashboard /wp-admin2,199 ▲195.50 ▼0.1189.55 ▼9.2541.54 ▼2.31
Posts /wp-admin/edit.php2,104 ▲12.00 ▲0.0140.97 ▼0.8033.78 ▼1.38
Add New Post /wp-admin/post-new.php1,538 ▲1218.24 ▼5.35645.29 ▼11.8770.73 ▲12.38
Media Library /wp-admin/upload.php1,407 ▲74.22 ▼0.0497.21 ▲3.2042.17 ▼1.66
GeoDataSource Country Region DropDown /wp-admin/options-general.php?page=geodatasource-country-region-dropdown8482.1528.2831.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/geodatasource-country-region-dropdown/geodatasource-country-region-dropdown.php:14

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 Passed 29 tests

readme.txt Passed 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
4 plugin tags: dropdown, country, targeted content, region

geodatasource-country-region-dropdown/geodatasource-country-region-dropdown.php Passed 13 tests

This is the main PHP file of "GeoDataSource Country Region DropDown" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
63 characters long description:
Provides country and region dropdown with shortcodes specified.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin88 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP131987
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 images were found in this plugin