88% pimap

Code Review | Pimap

WordPress plugin Pimap scored 88% from 54 tests.

About plugin

  • Plugin page: pimap
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0
  • WordPress version: 5.8.1
  • First release: Aug 12, 2014
  • Latest release: Aug 26, 2014
  • Number of updates: 13
  • Update frequency: every 1.5 days
  • Top authors: leobaiano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 873 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼140.67ms] Passed 4 tests

An overview of server-side resources used by Pimap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.00 ▲0.2839.18 ▲17.38
Dashboard /wp-admin3.30 ▲0.2539.14 ▼4.28
Posts /wp-admin/edit.php3.35 ▲0.2547.72 ▲3.30
Add New Post /wp-admin/post-new.php5.60 ▲0.1788.94 ▼565.02
Media Library /wp-admin/upload.php3.18 ▲0.1833.94 ▲3.32
All Pins /wp-admin/edit.php?post_type=pin3.2328.05
Add New /wp-admin/post-new.php?post_type=pin3.3146.50
Pin Type /wp-admin/edit-tags.php?taxonomy=pin-type&post_type=pin3.1834.26

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pimap
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,802 ▲20617.11 ▲1.6018.40 ▲6.6050.71 ▲2.70
Dashboard /wp-admin3,025 ▲945.99 ▲0.07148.06 ▲10.19116.05 ▲8.21
Posts /wp-admin/edit.php2,794 ▲552.72 ▲0.0074.58 ▲12.17102.21 ▲13.08
Add New Post /wp-admin/post-new.php1,712 ▲2918.85 ▲0.28395.05 ▲23.32104.45 ▼3.89
Media Library /wp-admin/upload.php1,862 ▲555.06 ▲0.05151.78 ▼3.74133.38 ▲16.33
All Pins /wp-admin/edit.php?post_type=pin1,4862.9774.4074.88
Add New /wp-admin/post-new.php?post_type=pin2,6407.47150.75107.88
Pin Type /wp-admin/edit-tags.php?taxonomy=pin-type&post_type=pin1,7942.3863.5980.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Odin_Front_End_Form' not found in wp-content/plugins/pimap/Odin/core/classes/class-post-form.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pimap/Odin/core/classes/widgets/class-widget-like-box.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/pimap/Odin/core/classes/class-bootstrap-nav.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pimap/Odin/core/classes/class-shortcodes.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Odin_Front_End_Form' not found in wp-content/plugins/pimap/Odin/core/classes/class-contact-form.php:12

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/edit.php?post_type=pin
    • > Javascript (severe) in unknown
    https://maps.google.com/maps/api/js 154:55 Uncaught Qe: Map: Expected mapDiv of type HTMLElement but was passed null.
    • > GET request to /wp-admin/post-new.php?post_type=pin
    • > Javascript (severe) in unknown
    /wp-content/plugins/pimap/assets/js/gmaps.js 20:4 Uncaught ReferenceError: data_pimap_post is not defined

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Initial options, the center of the map and zoom), #2 (Registration pin), #3 (Displaying the map on the site), #4 (Displaying image and content in infobox)
You can take inspiration from this readme.txt

pimap/pimap.php Passed 13 tests

This is the main PHP file of "Pimap" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
71 characters long description:
Create and register pins google maps with comments, pictures and videos

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin3,521 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP187931,8952,746
JavaScript4231262600
CSS2198124
PO File1161751

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity26.93
▷ Minimum class complexity1.00
▷ Maximum class complexity93.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods184
▷ Static methods42.17%
▷ Public methods11763.59%
▷ Protected methods6233.70%
▷ Private methods52.72%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.92MB with 0.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png257.64KB88.36KB▼ 65.70%
screenshot-1.png21.89KB8.63KB▼ 60.60%
screenshot-2.png293.72KB101.65KB▼ 65.39%
Odin/core/assets/images/placeholder.png0.22KB0.12KB▼ 43.89%
screenshot-3.png368.50KB127.62KB▼ 65.37%