78% codepeople-post-map

Code Review | Google Maps CP

WordPress plugin Google Maps CP scored78%from 54 tests.

About plugin

  • Plugin page: codepeople-post-map
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-6.3
  • WordPress version: 6.3.1
  • First release: Oct 1, 2012
  • Latest release: Jul 27, 2023
  • Number of updates: 254
  • Update frequency: every 15.6 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

6,000+ active /403,610 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.31MB] [CPU: ▼5.33ms] Passed 4 tests

Server-side resources used by Google Maps CP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3141.88 ▼9.13
Dashboard /wp-admin3.61 ▲0.2750.66 ▼13.36
Posts /wp-admin/edit.php3.73 ▲0.3756.81 ▲2.91
Add New Post /wp-admin/post-new.php6.22 ▲0.3489.92 ▼1.73
Media Library /wp-admin/upload.php3.54 ▲0.3142.71 ▲8.69

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 71 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
installed_codepeople-post-map
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Google Maps CP
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9114.43 ▼0.362.05 ▼0.3246.61 ▼3.40
Dashboard /wp-admin2,244 ▲645.66 ▲0.0193.84 ▲2.7539.20 ▲0.08
Posts /wp-admin/edit.php2,149 ▲492.01 ▲0.0540.93 ▲2.9735.58 ▼2.55
Add New Post /wp-admin/post-new.php7,623 ▲6,09519.66 ▼3.231,142.99 ▲448.2771.27 ▲2.70
Media Library /wp-admin/upload.php1,443 ▲434.23 ▲0.03114.30 ▼3.1947.57 ▼1.08
Online Help /wp-admin/codepeople-post-map.php?page=google_maps_cp_help260.420.1115.46
I've a Question /wp-admin/codepeople-post-map.php?page=google_maps_cp_question260.420.105.42
Upgrade /wp-admin/codepeople-post-map.php?page=google_maps_cp_upgrade260.420.068.73
Google Maps CP /wp-admin/codepeople-post-map.php260.420.144.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • installed_codepeople-post-map
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/codepeople-post-map/codepeople-post-map.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/codepeople-post-map.php?page=google_maps_cp_help
    • > Network (severe)
    wp-admin/codepeople-post-map.php?page=google_maps_cp_help - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/codepeople-post-map.php?page=google_maps_cp_question
    • > Network (severe)
    wp-admin/codepeople-post-map.php?page=google_maps_cp_question - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/codepeople-post-map.php?page=google_maps_cp_upgrade
    • > Network (severe)
    wp-admin/codepeople-post-map.php?page=google_maps_cp_upgrade - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/codepeople-post-map.php
    • > Network (severe)
    wp-admin/codepeople-post-map.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add a description for screenshot #12 in codepeople-post-map/assets to your readme.txt
  • Tags: There are too many tags (33 tag instead of maximum 10)
Please take inspiration from this readme.txt

codepeople-post-map/codepeople-post-map.php 92% from 13 tests

Analyzing the main PHP file in "Google Maps CP" version 1.1.1
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 549 characters long)

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
Good job! No executable or dangerous file extensions detected3,434 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP32061331,494
PO File24025191,052
JavaScript38546650
HTML110187
CSS371251

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity135.00
▷ Minimum class complexity10.00
▷ Maximum class complexity260.00
Average method complexity9.12
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods33
▷ Static methods13.03%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
52 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/animals.png1.31KB0.91KB▼ 30.25%
images/icons/coffee.png1.10KB0.83KB▼ 25.29%
images/icons/family.png1.20KB0.86KB▼ 28.59%
images/icons/iceskating.png1.32KB0.91KB▼ 31.02%
images/icons/webcam.png1.32KB0.91KB▼ 31.33%