62% cartes

Code Review | Maps by Cartes.io - live community and private maps for anything

WordPress plugin Maps by Cartes.io - live community and private maps for anything scored62%from 54 tests.

About plugin

  • Plugin page: cartes
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Jan 20, 2021
  • Latest release: Aug 19, 2022
  • Number of updates: 4
  • Update frequency: every 144.0 days
  • Top authors: mmediagroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /491 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼9.15ms] Passed 4 tests

Analyzing server-side resources used by Maps by Cartes.io - live community and private maps for anything
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1441.67 ▲2.09
Dashboard /wp-admin3.45 ▲0.1048.65 ▼14.97
Posts /wp-admin/edit.php3.56 ▲0.2044.43 ▼0.87
Add New Post /wp-admin/post-new.php6.03 ▲0.1483.97 ▼22.86
Media Library /wp-admin/upload.php3.37 ▲0.1436.30 ▲3.77
Discover Maps /wp-admin/admin.php?page=cartes_discover_maps3.39492.49
All Maps /wp-admin/admin.php?page=cartes_main_menu3.34301.09
Add New /wp-admin/admin-post.php?action=cartes_create_map&_wpnonce=792cf1bfb93.1323.08

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, 7 new options
New tables
wp_cartes
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
cartes_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Maps by Cartes.io - live community and private maps for anything
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.34 ▼0.251.57 ▼0.0637.16 ▼8.49
Dashboard /wp-admin2,221 ▲415.61 ▼0.0380.89 ▼8.9035.82 ▼6.10
Posts /wp-admin/edit.php2,120 ▲202.02 ▼0.0034.15 ▼2.8729.35 ▼6.40
Add New Post /wp-admin/post-new.php1,558 ▲3223.07 ▼0.12612.55 ▼0.0648.00 ▼0.40
Media Library /wp-admin/upload.php1,423 ▲234.18 ▼0.0494.44 ▲1.5240.42 ▼0.79
Discover Maps /wp-admin/admin.php?page=cartes_discover_maps1,1501.9822.0442.05
All Maps /wp-admin/admin.php?page=cartes_main_menu1,0292.1622.6223.59
Add New /wp-admin/admin-post.php?action=cartes_create_map&_wpnonce=792cf1bfb9280.420.083.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_cartes
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • cartes_db_version
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=cartes_main_menu
    • > Notice in wp-content/plugins/cartes/CartesWPList.php+240
    Undefined property: stdClass::$total
    • > GET request to /wp-admin/admin.php?page=cartes_main_menu
    • > Notice in wp-content/plugins/cartes/CartesWPList.php+241
    Undefined property: stdClass::$per_page
    • > GET request to /wp-admin/admin.php?page=cartes_main_menu
    • > Notice in wp-content/plugins/cartes/CartesWPList.php+242
    Undefined property: stdClass::$last_page
    • > GET request to /wp-admin/admin.php?page=cartes_main_menu
    • > Notice in wp-content/plugins/cartes/CartesWPList.php+114
    Undefined property: stdClass::$categories
    • > GET request to /wp-admin/admin.php?page=cartes_main_menu
    • > Warning in wp-content/plugins/cartes/CartesWPList.php+114
    array_map(): Expected parameter 2 to be an array, null given
    • > GET request to /wp-admin/admin.php?page=cartes_main_menu
    • > Warning in wp-content/plugins/cartes/CartesWPList.php+116
    implode(): Invalid arguments passed

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
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/cartes/CartesMap.php
    • > /wp-content/plugins/cartes/CartesIO.php
    • > /wp-content/plugins/cartes/CartesWPList.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin-post.php?action=cartes_create_map&_wpnonce=792cf1bfb9
    • > Network (severe)
    wp-admin/admin-post.php?action=cartes_create_map&_wpnonce=792cf1bfb9 - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 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
9 plugin tags: mapping, google maps, markers, cartes, leaflet...

cartes/CartesIO.php 85% from 13 tests

The main file in "Maps by Cartes.io - live community and private maps for anything" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cartes.php" instead of "CartesIO.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
No dangerous file extensions were detected706 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3201240700
CSS1106

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity22.00
▷ Minimum class complexity16.00
▷ Maximum class complexity28.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods56
▷ Static methods58.93%
▷ Public methods5191.07%
▷ Protected methods00.00%
▷ Private methods58.93%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin