78% zone-marker

Code Review | Zone Marker

WordPress plugin Zone Marker scored78%from 54 tests.

About plugin

  • Plugin page: zone-marker
  • Plugin version: 1.0.45
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.4.1
  • WordPress version: 6.3.1
  • First release: May 23, 2019
  • Latest release: Nov 24, 2023
  • Number of updates: 43
  • Update frequency: every 38.3 days
  • Top authors: routetoweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,042 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 gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼1.02ms] Passed 4 tests

Analyzing server-side resources used by Zone Marker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.75 ▼3.89
Dashboard /wp-admin3.43 ▲0.1247.09 ▼2.93
Posts /wp-admin/edit.php3.48 ▲0.1249.43 ▲0.89
Add New Post /wp-admin/post-new.php6.01 ▲0.1295.95 ▲2.73
Media Library /wp-admin/upload.php3.36 ▲0.1237.06 ▲1.87
Zone Marker /wp-admin/options-general.php?page=gil_zm_section3.3234.15

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
gil_zm_settings
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
gil_zm_layout

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zone Marker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5613.74 ▼0.581.65 ▲0.1042.30 ▼0.96
Dashboard /wp-admin2,205 ▲245.69 ▼0.03110.70 ▲5.6441.38 ▼0.41
Posts /wp-admin/edit.php2,116 ▲162.76 ▲0.8247.43 ▲5.8636.97 ▼3.11
Add New Post /wp-admin/post-new.php1,537 ▲1123.73 ▲0.13617.32 ▲0.2233.66 ▼11.80
Media Library /wp-admin/upload.php1,413 ▲105.14 ▲0.95103.65 ▲6.0342.15 ▼1.02
Zone Marker /wp-admin/options-general.php?page=gil_zm_section9082.7232.6531.42

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
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • gil_zm_layout
    • widget_recent-posts
    • theysaidso_admin_options
    • gil_zm_settings
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zone-marker/admin/zone-marker-admin.php:14
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/zone-marker/zone-marker.php on line 19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/zone-marker/zone-marker.php on line 19
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/zone-marker/zone-marker.php on line 19

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=gil_zm_section
    • > Network (severe)
    wp-content/plugins/zone-marker/public/css/gil-zone-marker.css - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=gil_zm_section
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?key&libraries=geometry&ver=6.3.1 224:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: drones, boundaries, video, maps, aerial...

zone-marker/zone-marker.php 92% from 13 tests

"Zone Marker" version 1.0.45'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:
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,387 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP498102573
PO File3183189469
JavaScript13333186
CSS2216107
SVG30352

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
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
Namespaces1
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/marker.png0.66KB0.63KB▼ 5.17%
admin/images/logo.png1.04KB0.89KB▼ 14.68%