84% mk-gf-wc-country

Code Review | mklasen's GF WC Country

WordPress plugin mklasen's GF WC Country scored84%from 54 tests.

About plugin

  • Plugin page: mk-gf-wc-country
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Nov 21, 2017
  • Latest release: Nov 21, 2017
  • Number of updates: 2
  • Update frequency: every 34.0 days
  • Top authors: mklasen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /619 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.01MB] [CPU: ▼9.53ms] Passed 4 tests

Server-side resources used by mklasen's GF WC Country
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.02 ▼6.35
Dashboard /wp-admin3.31 ▲0.0149.34 ▼1.57
Posts /wp-admin/edit.php3.36 ▲0.0147.52 ▼5.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.14 ▼23.02
Media Library /wp-admin/upload.php3.24 ▲0.0133.30 ▼3.35

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

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

Browser metrics Passed 4 tests

mklasen's GF WC Country: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.22 ▼0.181.69 ▼0.1642.29 ▲1.31
Dashboard /wp-admin2,195 ▲185.67 ▲0.0890.44 ▲1.0140.92 ▼4.16
Posts /wp-admin/edit.php2,100 ▼32.05 ▼0.0137.42 ▼6.0733.74 ▼0.34
Add New Post /wp-admin/post-new.php1,545 ▲1423.38 ▲0.02688.14 ▲17.0249.45 ▼14.12
Media Library /wp-admin/upload.php1,400 ▼04.24 ▼0.0197.30 ▼15.9141.27 ▼6.54

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mk-gf-wc-country/mk-gf-set-wc-country.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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: sync, gravity forms, woocommerce, country

mk-gf-wc-country/mk-gf-set-wc-country.php 92% from 13 tests

The main PHP script in "mklasen's GF WC Country" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mk-gf-wc-country.php" instead of "mk-gf-set-wc-country.php")

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
Success! There were no dangerous files found in this plugin27 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122327

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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 files were detected