84% wp-country

Code Review | WP Country

WordPress plugin WP Country scored84%from 54 tests.

About plugin

  • Plugin page: wp-country
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5
  • WordPress version: 6.3.1
  • First release: Dec 28, 2013
  • Latest release: Apr 16, 2016
  • Number of updates: 5
  • Update frequency: every 168.0 days
  • Top authors: andreyk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,807 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.03MB] [CPU: ▼3.67ms] Passed 4 tests

Analyzing server-side resources used by WP Country
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.83 ▲2.11
Dashboard /wp-admin3.35 ▲0.0045.81 ▼12.10
Posts /wp-admin/edit.php3.40 ▲0.0446.53 ▲4.35
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.72 ▼6.40
Media Library /wp-admin/upload.php3.27 ▲0.0434.46 ▲1.70

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Country
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.25 ▼0.391.75 ▲0.1938.83 ▼2.30
Dashboard /wp-admin2,195 ▲155.56 ▼0.1284.56 ▼0.0438.25 ▼5.36
Posts /wp-admin/edit.php2,097 ▼32.04 ▲0.0337.34 ▲3.1035.87 ▼0.85
Add New Post /wp-admin/post-new.php1,529 ▼223.16 ▲0.02637.43 ▼52.8255.11 ▲0.97
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.05108.02 ▲0.4446.12 ▲0.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-country/country.php:11

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 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
4 plugin tags: select, dropdown, country, countries list

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

The main file in "WP Country" v. 0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-country.php" instead of "country.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected814 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PO File12371491
PHP1128323

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.68
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity6.67
▷ Minimum method complexity2.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin