68% many-points-on-the-map

Code Review | Many points on the map

WordPress plugin Many points on the map scored68%from 54 tests.

About plugin

  • Plugin page: many-points-on-th...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Jul 25, 2018
  • Latest release: Aug 29, 2023
  • Number of updates: 11
  • Update frequency: every 169.2 days
  • Top authors: markomaksym (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,012 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.70ms] Passed 4 tests

A check of server-side resources used by Many points on the map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1244.49 ▲0.23
Dashboard /wp-admin3.43 ▲0.1253.96 ▼2.44
Posts /wp-admin/edit.php3.54 ▲0.1855.70 ▲3.34
Add New Post /wp-admin/post-new.php6.03 ▲0.1496.09 ▼6.87
Media Library /wp-admin/upload.php3.35 ▲0.1240.07 ▼1.73
Create a new map /wp-admin/admin.php?page=mxmpotm-many-points-on-the-map-add3.3739.56
Many points /wp-admin/admin.php?page=mxmpotm-many-points-on-the-map3.3541.54
Edit Map /wp-admin/admin.php?page=mxmpotm-many-points-on-the-map-edit3.4138.27
Settings /wp-admin/admin.php?page=mxmpotm-many-points-on-the-map-settings3.3536.48

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

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

Browser metrics Passed 4 tests

Many points on the map: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9314.43 ▲0.041.89 ▲0.0646.79 ▲4.57
Dashboard /wp-admin2,228 ▲515.60 ▲0.0399.71 ▲2.6242.50 ▼1.74
Posts /wp-admin/edit.php2,139 ▲422.00 ▼0.0342.28 ▲2.8437.77 ▼4.49
Add New Post /wp-admin/post-new.php1,557 ▲2723.17 ▼0.06613.60 ▼86.8356.84 ▲2.10
Media Library /wp-admin/upload.php1,439 ▲394.30 ▲0.10102.80 ▼11.6247.23 ▼1.19
Create a new map /wp-admin/admin.php?page=mxmpotm-many-points-on-the-map-add1,6033.1645.91111.76
Many points /wp-admin/admin.php?page=mxmpotm-many-points-on-the-map1,0623.1438.9835.44
Edit Map /wp-admin/admin.php?page=mxmpotm-many-points-on-the-map-edit1,7304.0646.2750.70
Settings /wp-admin/admin.php?page=mxmpotm-many-points-on-the-map-settings1,0313.0738.8334.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_mxmpotm_map_points
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=mxmpotm-many-points-on-the-map-edit
    • > Notice in wp-content/plugins/many-points-on-the-map/includes/admin/templates/edit_map.php+6
    Undefined index: map
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mxmpotm-many-points-on-the-map-edit
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/many-points-on-the-map/includes/admin/templates/components/js_vars.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/many-points-on-the-map/includes/admin/templates/components/add_point_for_js.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: map, google maps

many-points-on-the-map/many-points-on-the-map.php Passed 13 tests

The primary PHP file in "Many points on the map" version 1.4.1 is used by WordPress to initiate all plugin functionality
73 characters long description:
The plugin helps you set points on the map and filter them in the future.

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 plugin7,543 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,1464343,307
CSS52242,435
PHP15631240975
SVG100685
PO File16481141

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.18
Average class complexity7.60
▷ Minimum class complexity2.00
▷ Maximum class complexity21.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods33
▷ Static methods39.09%
▷ Public methods3296.97%
▷ Protected methods00.00%
▷ Private methods13.03%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/admin/assets/img/default_icon.png19.02KB1.76KB▼ 90.74%