84% delivery-area-with-google-maps

Code Review | Delivery Area with Google Maps

WordPress plugin Delivery Area with Google Maps scored84%from 54 tests.

About plugin

  • Plugin page: delivery-area-wit...
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-5.0.2
  • WordPress version: 6.3.1
  • First release: Dec 30, 2018
  • Latest release: Nov 3, 2019
  • Number of updates: 10
  • Update frequency: every 31.0 days
  • Top authors: gonzalesc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,824 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.69ms] Passed 4 tests

Analyzing server-side resources used by Delivery Area with Google Maps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.06 ▼5.08
Dashboard /wp-admin3.38 ▲0.0853.78 ▼6.11
Posts /wp-admin/edit.php3.43 ▲0.0848.39 ▼0.87
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.52 ▼6.69
Media Library /wp-admin/upload.php3.30 ▲0.0737.01 ▲0.73
Areas List /wp-admin/edit.php?post_type=areamaps3.3439.52
Add New Area /wp-admin/post-new.php?post_type=areamaps3.3438.67
Settings /wp-admin/edit.php?post_type=areamaps&page=area_settings3.2932.60

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Delivery Area with Google Maps
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.42 ▲0.021.84 ▲0.0643.73 ▼3.99
Dashboard /wp-admin2,231 ▲545.54 ▼0.0095.81 ▲2.8341.97 ▼2.48
Posts /wp-admin/edit.php2,139 ▲391.97 ▼0.0435.23 ▼2.9634.29 ▼0.05
Add New Post /wp-admin/post-new.php1,576 ▲5023.26 ▲5.48652.19 ▼60.4858.99 ▲1.29
Media Library /wp-admin/upload.php1,439 ▲394.23 ▲0.06100.95 ▼13.3545.28 ▼3.60
Areas List /wp-admin/edit.php?post_type=areamaps1,1161.9331.4931.59
Add New Area /wp-admin/post-new.php?post_type=areamaps1,5542.5855.9156.71
Settings /wp-admin/edit.php?post_type=areamaps&page=area_settings9002.0222.3228.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined index: id in wp-content/plugins/delivery-area-with-google-maps/public/assets/js/frontmap_js.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/delivery-area-with-google-maps/admin/layouts/view-admin-maps.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/delivery-area-with-google-maps/admin/layouts/template_options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_key() in wp-content/plugins/delivery-area-with-google-maps/admin/assets/js/areamap_js.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/delivery-area-with-google-maps/includes/class-areamaps-cpt.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
10 plugin tags: shortcode, area, delivery, delivery area, wordpress...

delivery-area-with-google-maps/index.php 85% from 13 tests

The main PHP file in "Delivery Area with Google Maps" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.2" instead of "4.9.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("delivery-area-with-google-maps.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin836 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP1423690744
PO File1303292

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.25
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods38
▷ Static methods37.89%
▷ Public methods3694.74%
▷ Protected methods00.00%
▷ Private methods25.26%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin