68% 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 scored 68% from 54 tests.

About plugin

  • Plugin page: cartes
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 5.8.1
  • First release: Jan 20, 2021
  • Latest release: Mar 11, 2021
  • Number of updates: 3
  • Update frequency: every 16.7 days
  • Top authors: mmediagroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 143 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.03MB] [CPU: ▼146.37ms] 75% from 4 tests

Analyzing server-side resources used by Maps by Cartes.io - live community and private maps for anything
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 2,296.17ms on /wp-admin/admin.php?page=cartes_discover_maps)
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0330.85 ▼4.60
Dashboard /wp-admin3.09 ▲0.0443.42 ▼2.56
Posts /wp-admin/edit.php3.15 ▲0.0439.59 ▼3.05
Add New Post /wp-admin/post-new.php5.45 ▲0.0285.76 ▼575.26
Media Library /wp-admin/upload.php3.04 ▲0.0430.83 ▼2.52
Add New /wp-admin/admin-post.php?action=cartes_create_map&_wpnonce=31dfaae4c12.8018.57
Discover Maps /wp-admin/admin.php?page=cartes_discover_maps3.102,296.17
All Maps /wp-admin/admin.php?page=cartes_main_menu3.04237.27

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, 1 new option
New tables
wp_cartes
New WordPress options
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 /3,585 ▼1116.20 ▲0.5710.29 ▲1.2455.97 ▲1.09
Dashboard /wp-admin2,842 ▼925.94 ▲0.01136.37 ▼1.3474.47 ▼31.01
Posts /wp-admin/edit.php2,762 ▲232.68 ▼0.0162.27 ▼0.4074.82 ▼12.20
Add New Post /wp-admin/post-new.php1,522 ▲2418.49 ▼0.31351.50 ▼11.11101.05 ▼3.03
Media Library /wp-admin/upload.php1,836 ▲295.01 ▼0.00129.34 ▼16.98111.64 ▼4.34
Add New /wp-admin/admin-post.php?action=cartes_create_map&_wpnonce=31dfaae4c1280.900.059.68
Discover Maps /wp-admin/admin.php?page=cartes_discover_maps1,5892.0954.2375.65
All Maps /wp-admin/admin.php?page=cartes_main_menu1,3532.2162.4072.13

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 1 option in the database
    • cartes_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/cartes/CartesIO.php
    • > /wp-content/plugins/cartes/CartesMap.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=31dfaae4c1
    • > Network (severe)
    wp-admin/admin-post.php?action=cartes_create_map&_wpnonce=31dfaae4c1 - 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: cartesio, markers, google maps, mapping, maps...

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.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cartes.php" instead of "CartesIO.php")

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 detected703 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3201240697
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