83% ia-map-analytics-basic

Code Review | IA Map Analytics Basic

WordPress plugin IA Map Analytics Basic scored83%from 54 tests.

About plugin

  • Plugin page: ia-map-analytics-...
  • Plugin version: 20170413...
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.1
  • WordPress version: 6.3.1
  • First release: Nov 22, 2017
  • Latest release: Nov 7, 2018
  • Number of updates: 11
  • Update frequency: every 31.9 days
  • Top authors: bnisia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /942 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼20.91ms] Passed 4 tests

A check of server-side resources used by IA Map Analytics Basic
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1939.29 ▼9.96
Dashboard /wp-admin3.36 ▲0.0234.52 ▼31.78
Posts /wp-admin/edit.php3.43 ▲0.0837.31 ▼14.66
Add New Post /wp-admin/post-new.php5.63 ▼0.2575.06 ▼27.24
Media Library /wp-admin/upload.php3.37 ▲0.1433.87 ▼3.67

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 474 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_map_analytics_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for IA Map Analytics Basic
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16615.02 ▲0.729.64 ▲7.7441.67 ▼3.01
Dashboard /wp-admin2,219 ▲315.93 ▲1.06118.46 ▲2.0988.35 ▲44.10
Posts /wp-admin/edit.php2,117 ▲282.72 ▲0.6645.71 ▲8.3337.44 ▼2.49
Add New Post /wp-admin/post-new.php7,497 ▲5,98322.65 ▲4.931,137.21 ▲448.4955.92 ▲1.28
Media Library /wp-admin/upload.php1,410 ▲225.14 ▲0.92103.80 ▼6.4583.88 ▲37.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_map_analytics_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ia-map-analytics-basic/ia-mapanalytics.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

ia-map-analytics-basic/ia-mapanalytics.php 85% from 13 tests

Analyzing the main PHP file in "IA Map Analytics Basic" version 20170413...
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ia-map-analytics-basic.php" instead of "ia-mapanalytics.php")
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "20170413...")

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
There were no executable files found in this plugin12,305 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,2442,23410,294
PHP23891451,877
SVG504111
CSS10023

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions2796.43%
▷ Anonymous functions13.57%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
458 compressed PNG files occupy 0.69MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/markers/grocerystore.shadow.png0.53KB0.63KB0.00%
images/markers/marina.png1.09KB1.38KB0.00%
images/markers/icon29.png0.64KB0.59KB▼ 8.40%
images/markers/icon17(2).png2.34KB1.86KB▼ 20.53%
images/markers/purple-dot.png1.32KB1.08KB▼ 18.29%