77% asd-feature-maps

Code Review | ASD Feature Maps

WordPress plugin ASD Feature Maps scored77%from 54 tests.

About plugin

  • Plugin page: asd-feature-maps
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7.3
  • WordPress version: 6.3.1
  • First release: Mar 10, 2017
  • Latest release: Mar 27, 2017
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: alexstillwagon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /664 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.56MB] [CPU: ▼4.21ms] Passed 4 tests

Analyzing server-side resources used by ASD Feature Maps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5344.27 ▲3.80
Dashboard /wp-admin3.86 ▲0.5652.40 ▼0.43
Posts /wp-admin/edit.php3.92 ▲0.5654.30 ▼3.25
Add New Post /wp-admin/post-new.php6.52 ▲0.6392.88 ▼16.94
Media Library /wp-admin/upload.php3.80 ▲0.5742.91 ▲4.73
New Place /wp-admin/post-new.php?post_type=asd_feature_map3.9962.68
Categories /wp-admin/edit-tags.php?taxonomy=asd_map_category&post_type=asd_feature_map3.8044.89
Export /wp-admin/edit.php?post_type=acf&page=acf-export3.7635.69
Add-ons /wp-admin/edit.php?post_type=acf&page=acf-addons3.7035.61
Custom Fields /wp-admin/edit.php?post_type=acf3.9442.09
All Places /wp-admin/edit.php?post_type=asd_feature_map3.8341.13

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 313 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
asd_map_category_children
acf_version
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by ASD Feature Maps
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,011 ▲25014.83 ▲0.5229.58 ▲27.8141.11 ▲2.01
Dashboard /wp-admin2,265 ▲915.63 ▲0.0182.80 ▼4.3581.41 ▲35.99
Posts /wp-admin/edit.php2,170 ▲672.04 ▲0.0434.97 ▼3.2034.40 ▲0.42
Add New Post /wp-admin/post-new.php6,678 ▲5,14324.42 ▲1.141,005.70 ▲339.0039.25 ▼12.43
Media Library /wp-admin/upload.php1,467 ▲674.16 ▼0.0895.06 ▼5.2081.91 ▲39.30
New Place /wp-admin/post-new.php?post_type=asd_feature_map4,29812.58289.74137.86
Categories /wp-admin/edit-tags.php?taxonomy=asd_map_category&post_type=asd_feature_map1,4462.2127.0936.96
Export /wp-admin/edit.php?post_type=acf&page=acf-export1,0072.0530.1931.61
Add-ons /wp-admin/edit.php?post_type=acf&page=acf-addons1,0692.1827.4233.61
Custom Fields /wp-admin/edit.php?post_type=acf1,2262.0736.3937.29
All Places /wp-admin/edit.php?post_type=asd_feature_map1,1542.0138.6631.39

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • can_compress_scripts
    • asd_map_category_children
    • acf_version
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 40× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/asd-feature-maps/includes/advanced-custom-fields/core/fields/true_false.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asd-feature-maps/includes/advanced-custom-fields/core/controllers/upgrade.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/asd-feature-maps/includes/advanced-custom-fields/core/views/meta_box_options.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/asd-feature-maps/includes/advanced-custom-fields/core/fields/_functions.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asd-feature-maps/includes/advanced-custom-fields/core/controllers/revisions.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/asd-feature-maps/includes/advanced-custom-fields/core/fields/page_link.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asd-feature-maps/includes/advanced-custom-fields/core/controllers/post.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/asd-feature-maps/includes/advanced-custom-fields/core/fields/number.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/asd-feature-maps/includes/advanced-custom-fields/core/fields/email.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/asd-feature-maps/includes/advanced-custom-fields/core/fields/password.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=asd_feature_map
    • > Network (severe)
    wp-content/plugins/asd-feature-maps/images/icons/rocket-1.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=asd_feature_map
    • > Console-api (warning) in unknown
    https://www.google.com/jsapi?_=1697324646040 144:27 "Loading Maps API with the jsapi loader is deprecated."
    • > GET request to /wp-admin/post-new.php?post_type=asd_feature_map
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?jsapiRedirect=true&key=AIzaSyCJ9qw8k4lvjsxkwZ25lxHkNYxl4TqBjlQ&libraries=places 235: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"
    • > GET request to /wp-admin/post-new.php?post_type=asd_feature_map
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?jsapiRedirect=true&key=AIzaSyCJ9qw8k4lvjsxkwZ25lxHkNYxl4TqBjlQ&libraries=places 153:248 "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started"

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Create / edit map places.), #2 (Manage all places with the standard WP methods.), #3 (Select a icon to show on the map or upload a custom icon file.), #4 (Basic frontend view showing all categories and places.), #5 (Frontend view showing a place detail.)
Please take inspiration from this readme.txt

asd-feature-maps/asd_feature_map.php 77% from 13 tests

The main PHP file in "ASD Feature Maps" ver. 1.3.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("asd-feature-maps.php" instead of "asd_feature_map.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Requires at least: Required version does not match the one declared in readme.txt ("3.8.0" instead of "3.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin39,988 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
PO File239,29713,65320,306
PHP444,0844,7729,934
JavaScript254,0162,9587,327
CSS77134022,421

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity24.37
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity4.26
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods272
▷ Static methods00.00%
▷ Public methods272100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions62
▷ Named functions62100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
176 PNG files occupy 1.48MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/award.png0.40KB0.32KB▼ 18.72%
images/icons/fish.png1.24KB0.43KB▼ 65.12%
images/icons/campsite.png0.34KB0.31KB▼ 9.71%
images/icons/cake.png1.25KB0.40KB▼ 67.94%
images/icons/cancel.png0.30KB0.28KB▼ 7.17%