84% waymark

Code Review | Waymark

WordPress plugin Waymark scored84%from 54 tests.

About plugin

  • Plugin page: waymark
  • Plugin version: 0.9.29.4
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Jul 25, 2019
  • Latest release: Nov 21, 2023
  • Number of updates: 134
  • Update frequency: every 11.8 days
  • Top authors: morehawes (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

500+ active /11,797 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
This plugin's installer ran successfully

Server metrics [RAM: ▲1.06MB] [CPU: ▲1.54ms] Passed 4 tests

A check of server-side resources used by Waymark
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.21 ▲0.7442.59 ▲2.17
Dashboard /wp-admin4.48 ▲1.1354.52 ▼11.48
Posts /wp-admin/edit.php4.54 ▲1.1863.73 ▲17.35
Add New Post /wp-admin/post-new.php7.08 ▲1.1999.98 ▲3.43
Media Library /wp-admin/upload.php4.41 ▲1.1845.13 ▲12.04
New Map /wp-admin/post-new.php?post_type=waymark_map4.6061.34
Collections /wp-admin/edit-tags.php?taxonomy=waymark_collection&post_type=waymark_map4.5353.93
Settings /wp-admin/edit.php?post_type=waymark_map&page=waymark-settings4.3845.11
Maps /wp-admin/edit.php?post_type=waymark_map4.4647.62

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Waymark
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,018 ▲27115.94 ▲1.2011.94 ▲10.3439.20 ▼3.43
Dashboard /wp-admin2,282 ▲1026.51 ▲0.89112.80 ▲15.6441.95 ▼4.19
Posts /wp-admin/edit.php2,176 ▲733.70 ▲1.7551.17 ▲10.5556.25 ▲22.94
Add New Post /wp-admin/post-new.php1,606 ▲8023.95 ▲0.88608.59 ▼36.8332.20 ▼22.48
Media Library /wp-admin/upload.php1,558 ▲1586.22 ▲2.0597.05 ▲0.7443.14 ▲1.56
New Map /wp-admin/post-new.php?post_type=waymark_map2,7189.01203.92108.27
Collections /wp-admin/edit-tags.php?taxonomy=waymark_collection&post_type=waymark_map1,3393.4743.7054.69
Settings /wp-admin/edit.php?post_type=waymark_map&page=waymark-settings11,3647.26322.0773.55
Maps /wp-admin/edit.php?post_type=waymark_map1,1783.7945.7754.95

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • Waymark_Settings_
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | 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
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/waymark/inc/Front/Waymark_Content.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Waymark_Config' not found in wp-content/plugins/waymark/inc/Admin/Waymark_JS.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_meta_box() in wp-content/plugins/waymark/inc/Admin/Waymark_Meta.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waymark/inc/Front/Waymark_JS.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/waymark/inc/Waymark_Config.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/waymark/inc/Waymark_Config.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/waymark/inc/Front/Waymark_HTTP.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/waymark/inc/Waymark_Taxonomies.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waymark/inc/Admin/Waymark_AJAX.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_menu_page() in wp-content/plugins/waymark/inc/Admin/Waymark_Menu.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: maps, kml, location, geojson, map markers...

waymark/Waymark.php 85% from 13 tests

The main file in "Waymark" v. 0.9.29.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 209 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("waymark.php" instead of "Waymark.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
Good job! No executable or dangerous file extensions detected30,156 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript233,3943,21915,428
SVG2034,898
PHP261,0178604,820
CSS171973203,056
LESS61053261,673
Markdown11470281

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity28.56
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity4.77
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods181
▷ Static methods8848.62%
▷ Public methods18099.45%
▷ Protected methods00.00%
▷ Private methods10.55%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.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
39 PNG files occupy 0.38MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dist/waymark-js/images/waymark-icon-red.png9.74KB5.35KB▼ 45.02%
waymark-js/dist/images/layers.png0.68KB1.05KB0.00%
assets/dist/waymark-js/images/markers-shadow@2x.png1.43KB1.56KB0.00%
waymark-js/dist/images/fullscreen@2x.png0.41KB0.15KB▼ 63.10%
assets/dist/waymark-js/images/marker-icon-2x.png2.41KB2.52KB0.00%