84% korea-map

Code Review | Korea Map

WordPress plugin Korea Map scored 84% from 53 tests.

About plugin

  • Plugin page: korea-map
  • Plugin version: 0.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 5.8.1
  • First release: May 25, 2020
  • Latest release: May 12, 2021
  • Number of updates: 6
  • Update frequency: every 59.2 days
  • Top authors: Jongmyoung Kim (100%)

Code review

53 tests

User reviews

1 review

Install metrics

100+ active / 771 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼262.71ms] Passed 4 tests

A check of server-side resources used by Korea Map
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1534.36 ▲14.37
Dashboard /wp-admin3.10 ▲0.0435.78 ▼13.98
Posts /wp-admin/edit.php3.15 ▲0.0441.62 ▲6.49
Add New Post /wp-admin/post-new.php5.46 ▲0.0386.56 ▼1,039.20
Media Library /wp-admin/upload.php3.04 ▲0.0332.09 ▼4.14
Korea Map /wp-admin/options-general.php?page=kims_admin_settings3.0126.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Korea Map
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,823 ▲21716.24 ▲0.7011.67 ▲3.1051.59 ▲7.03
Dashboard /wp-admin2,969 ▲1165.97 ▲0.08135.53 ▲5.64100.74 ▲1.59
Posts /wp-admin/edit.php2,713 ▲72.68 ▼0.0165.77 ▲1.4686.28 ▼14.00
Add New Post /wp-admin/post-new.php1,856 ▲317.71 ▼1.35361.60 ▲9.59111.09 ▲1.65
Media Library /wp-admin/upload.php1,779 ▲74.99 ▼0.02140.01 ▼7.26113.39 ▼4.19
Korea Map /wp-admin/options-general.php?page=kims_admin_settings1,4522.3453.19102.56

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • kimsmap

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
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 fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/korea-map/korea-map.php:49
    • > PHP Warning
      include(KIMS_INCLUDE_DIRsetting.php): failed to open stream: No such file or directory in wp-content/plugins/korea-map/inc/admin.php on line 3
    • > PHP Warning
      Use of undefined constant KIMS_INCLUDE_DIR - assumed 'KIMS_INCLUDE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/korea-map/inc/admin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/korea-map/inc/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/korea-map/inc/user.php:2
    • > PHP Warning
      include(): Failed opening 'KIMS_INCLUDE_DIRsetting.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/korea-map/inc/admin.php on line 3

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Please a description for screenshot #4 in korea-map/assets to your readme.txt
The official readme.txt is a good inspiration

korea-map/korea-map.php 92% from 13 tests

Analyzing the main PHP file in "Korea Map" version 0.1.3
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin371 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP69228310
JavaScript120351
CSS12210

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/m01.png1.37KB1.14KB▼ 16.93%
images/m04.png1.33KB1.20KB▼ 10.13%
images/m02.png1.43KB1.17KB▼ 18.40%
images/m06.png1.35KB1.19KB▼ 12.34%
images/m05.png1.73KB1.36KB▼ 21.23%