84% contact-address-with-google-map-location

Code Review | Address and Google Map Widget

WordPress plugin Address and Google Map Widget scored84%from 54 tests.

About plugin

  • Plugin page: contact-address-w...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 20, 2016
  • Latest release: Jun 20, 2019
  • Number of updates: 7
  • Update frequency: every 144.7 days
  • Top authors: ravikumar1986ravi (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) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Address and Google Map Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.06 ▼13.15
Dashboard /wp-admin3.32 ▼0.0348.17 ▼9.88
Posts /wp-admin/edit.php3.37 ▲0.0153.80 ▲1.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.77 ▼2.86
Media Library /wp-admin/upload.php3.24 ▲0.0137.72 ▲4.07

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_rbrother-google-map
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Address and Google Map Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.56 ▼0.731.86 ▲0.2845.00 ▲2.45
Dashboard /wp-admin2,221 ▲154.81 ▼0.27111.74 ▲6.8645.24 ▲3.22
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0639.78 ▼1.4237.31 ▼1.77
Add New Post /wp-admin/post-new.php1,552 ▼223.33 ▲5.15640.13 ▲28.5262.36 ▲10.51
Media Library /wp-admin/upload.php1,400 ▼04.26 ▲0.0296.29 ▼9.4344.05 ▼2.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_rbrother-google-map
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/contact-address-with-google-map-location/rbrother-google-map.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: widget, contact address, text, plugin, html...

contact-address-with-google-map-location/rbrother-google-map.php 92% from 13 tests

The main file in "Address and Google Map Widget" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("contact-address-with-google-map-location.php" instead of "rbrother-google-map.php")

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
Everything looks great! No dangerous files found in this plugin66 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1311466

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin