84% maps-for-woocommerce

Code Review | Maps for WooCommerce

WordPress plugin Maps for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: maps-for-woocommerce
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.0
  • WordPress version: 6.3.1
  • First release: Jul 6, 2022
  • Latest release: Jan 3, 2023
  • Number of updates: 7
  • Update frequency: every 26.0 days
  • Top authors: johndcoy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,218 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.71ms] Passed 4 tests

Server-side resources used by Maps for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0134.38 ▼5.91
Dashboard /wp-admin3.31 ▲0.0144.09 ▼3.32
Posts /wp-admin/edit.php3.36 ▲0.0148.11 ▼1.02
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.55 ▼8.58
Media Library /wp-admin/upload.php3.24 ▲0.0135.86 ▲0.24

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Maps for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4513.61 ▼0.981.72 ▼0.3839.04 ▼7.03
Dashboard /wp-admin2,208 ▲264.86 ▼0.07114.45 ▲4.5841.57 ▲1.84
Posts /wp-admin/edit.php2,094 ▲52.03 ▲0.0234.76 ▼1.6529.20 ▼4.22
Add New Post /wp-admin/post-new.php1,536 ▲2223.30 ▲5.71670.25 ▲22.5755.00 ▲2.75
Media Library /wp-admin/upload.php1,390 ▲24.24 ▲0.0796.79 ▼1.5441.49 ▼5.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 everything seems fine, this is not 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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/maps-for-woocommerce/maps/google-maps.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/maps-for-woocommerce/maps/mapbox.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (This screen shot of the o corresponds to maps-for-woocommerce-demo.png. Screenshots are stored in the /assets directory.), #2 (This is the second screen shot)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === maps-for-woocommerce === )
The official readme.txt is a good inspiration

maps-for-woocommerce/maps-for-woocommerce.php Passed 13 tests

The main PHP file in "Maps for WooCommerce" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
55 characters long description:
Add a map to your orders based on the shipping address.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin285 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP463107267
JavaScript13018

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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