94% first-google-map

Code Review | First Google Map

WordPress plugin First Google Map scored 94% from 54 tests.

About plugin

  • Plugin page: first-google-map
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Jul 15, 2013
  • Latest release: Jul 22, 2013
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: designpromote (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,102 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼293.76ms] Passed 4 tests

Server-side resources used by First Google Map
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0160.73 ▲12.45
Dashboard /wp-admin3.41 ▲0.0031.76 ▼5.19
Posts /wp-admin/edit.php3.64 ▲0.0037.37 ▲2.01
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.19 ▼1,173.52
Media Library /wp-admin/upload.php3.30 ▲0.0023.95 ▲1.68

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by First Google Map
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.82 ▲0.085.41 ▼1.202.35 ▼0.24
Dashboard /wp-admin2,895 ▲346.11 ▼0.04111.83 ▼16.78155.88 ▼3.79
Posts /wp-admin/edit.php2,688 ▼63.25 ▼0.1163.70 ▲1.13140.57 ▼1.23
Add New Post /wp-admin/post-new.php1,690 ▲2920.91 ▲4.87439.54 ▲10.12156.60 ▲2.13
Media Library /wp-admin/upload.php1,698 ▼35.52 ▼0.02142.67 ▲1.48189.81 ▲9.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
  • 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/first-google-map/zn-google-map.php:163

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === first-google-map === )
Please take inspiration from this readme.txt

first-google-map/zn-google-map.php 92% from 13 tests

"First Google Map" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("first-google-map.php" instead of "zn-google-map.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
Everything looks great! No dangerous files found in this plugin120 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13851120

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions3
▷ Named functions3100.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
No PNG images were found in this plugin