84% simple-map-with-shortcode

Code Review | Simple Map With Shortcode

WordPress plugin Simple Map With Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: simple-map-with-s...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.9.2
  • WordPress version: 6.3.1
  • First release: Mar 24, 2022
  • Latest release: Mar 24, 2022
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: arjun50soni (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /223 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Simple Map With Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.74 ▼3.79
Dashboard /wp-admin3.42 ▲0.1144.25 ▼2.59
Posts /wp-admin/edit.php3.51 ▲0.1645.51 ▲1.32
Add New Post /wp-admin/post-new.php6.11 ▲0.2372.88 ▼12.23
Media Library /wp-admin/upload.php3.36 ▲0.1331.99 ▼4.65

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Simple Map With Shortcode: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.27 ▼0.971.73 ▼0.1742.78 ▼6.83
Dashboard /wp-admin2,222 ▲404.85 ▼1.01102.25 ▼5.0741.52 ▼4.05
Posts /wp-admin/edit.php2,105 ▲162.04 ▲0.0439.59 ▲1.7235.71 ▲4.54
Add New Post /wp-admin/post-new.php1,531 ▼1123.04 ▲4.67675.93 ▲12.6858.87 ▲4.02
Media Library /wp-admin/upload.php1,407 ▲194.19 ▼0.0594.90 ▼11.9140.21 ▼4.99

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-map-with-shortcode/includes/class-shortcode.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: map, google map, map with marker, direction

simple-map-with-shortcode/simple-map-with-shortcode.php Passed 13 tests

The main file in "Simple Map With Shortcode" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
120 characters long description:
Create Google Maps in a minute with Simple Map With Shortcode WordPress plugin add google map with shortcode or php code

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 plugin268 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP75496244
CSS11316
JavaScript1008

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity3.75
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods24
▷ Static methods833.33%
▷ Public methods1562.50%
▷ Protected methods00.00%
▷ Private methods937.50%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/marker-icon.png1.43KB1.55KB0.00%
assets/css/images/icon_new_marker.png1.43KB1.55KB0.00%
assets/images/marker-icon-2x.png2.41KB2.52KB0.00%
assets/images/marker-shadow.png0.60KB1.16KB0.00%
assets/images/marker.png6.42KB0.91KB▼ 85.89%