83% nm-google-map

Code Review | WordPress Google Map

WordPress plugin WordPress Google Map scored83%from 54 tests.

About plugin

  • Plugin page: nm-google-map
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.5.2
  • WordPress version: 6.3.1
  • First release: Sep 14, 2014
  • Latest release: May 30, 2016
  • Number of updates: 3
  • Update frequency: every 208.7 days
  • Top authors: nitinmaurya12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,022 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by WordPress Google Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.10 ▲1.21
Dashboard /wp-admin3.31 ▲0.0143.99 ▼7.35
Posts /wp-admin/edit.php3.36 ▲0.0044.51 ▲1.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.88 ▼10.90
Media Library /wp-admin/upload.php3.23 ▲0.0042.52 ▲12.00

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Google Map
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.47 ▲0.091.70 ▲0.1545.57 ▲9.31
Dashboard /wp-admin2,224 ▲365.91 ▲1.0093.07 ▼6.3269.43 ▲26.50
Posts /wp-admin/edit.php2,107 ▲151.98 ▼0.0335.91 ▼13.2131.71 ▼11.65
Add New Post /wp-admin/post-new.php1,680 ▲15122.53 ▼0.58689.23 ▲20.1651.78 ▼1.49
Media Library /wp-admin/upload.php1,400 ▲94.20 ▼0.0190.44 ▼9.5979.31 ▲33.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/nm-google-map/nm-wp-google-map.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nm-google-map/form.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (WordPress Google Map) image not found
The official readme.txt might help

nm-google-map/nm-wp-google-map.php 85% from 13 tests

"WordPress Google Map" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("nm-google-map.php" instead of "nm-wp-google-map.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin322 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2359322

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png4.27KB1.65KB▼ 61.49%
link.png3.05KB0.67KB▼ 78.22%
markers/marker4.png1.52KB1.51KB▼ 0.77%
markers/marker2.png0.84KB1.12KB0.00%
markers/marker3.png1.61KB1.51KB▼ 6.31%