83% add-multiple-marker

Code Review | Add Multiple Marker

WordPress plugin Add Multiple Marker scored83%from 54 tests.

About plugin

  • Plugin page: add-multiple-marker
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2018
  • Latest release: Oct 4, 2021
  • Number of updates: 7
  • Update frequency: every 150.9 days
  • Top authors: krishaweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,167 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.53ms] Passed 4 tests

Server-side resources used by Add Multiple Marker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0644.02 ▲1.60
Dashboard /wp-admin3.37 ▲0.0650.77 ▼7.28
Posts /wp-admin/edit.php3.42 ▲0.0655.83 ▲6.47
Add New Post /wp-admin/post-new.php5.97 ▲0.0889.24 ▼2.47
Media Library /wp-admin/upload.php3.29 ▲0.0640.59 ▲2.05
Map integration /wp-admin/admin.php?page=amm-map-integration3.3235.47
Add Multiple Marker /wp-admin/admin.php?page=addmultiplemarker3.2735.55

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Multiple Marker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲11013.20 ▼1.072.26 ▲0.4043.39 ▼7.78
Dashboard /wp-admin2,235 ▲615.86 ▲0.2289.58 ▼10.2285.66 ▲39.99
Posts /wp-admin/edit.php2,163 ▲662.31 ▲0.3439.53 ▲0.2543.77 ▲8.57
Add New Post /wp-admin/post-new.php1,571 ▲4523.48 ▲0.39731.86 ▲21.7434.75 ▼17.77
Media Library /wp-admin/upload.php1,446 ▲434.37 ▲0.17108.35 ▲1.2387.33 ▲38.23
Map integration /wp-admin/admin.php?page=amm-map-integration1,0842.3037.1044.94
Add Multiple Marker /wp-admin/admin.php?page=addmultiplemarker1,1742.2837.1644.32

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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
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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/add-multiple-marker/admin/map-integration.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-multiple-marker/functions.php:185
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/add-multiple-marker/admin/admin-options.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: map marker, multiple marker, drawing tools, multi marker, custom marker...

add-multiple-marker/addmultiplemarker.php 77% from 13 tests

"Add Multiple Marker" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("add-multiple-marker.php" instead of "addmultiplemarker.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 206 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin121,420 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
SVG1701118,446
JavaScript41912261,227
CSS33116803
PHP53195461
HTML100389
PO File1383994

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.90
▷ 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 methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/amm-logo.png12.10KB6.33KB▼ 47.73%
admin/images/defaultmarker.png2.09KB1.47KB▼ 29.61%
admin/images/marker2.png2.37KB1.57KB▼ 33.73%
admin/images/marker1.png2.47KB1.66KB▼ 32.65%
admin/images/marker3.png2.52KB1.55KB▼ 38.38%