84% advanced-google-maps-shortcode

Code Review | Advanced Google Maps Shortcode

WordPress plugin Advanced Google Maps Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: advanced-google-m...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7
  • WordPress version: 6.3.1
  • First release: Feb 1, 2016
  • Latest release: Apr 10, 2016
  • Number of updates: 6
  • Update frequency: every 54.2 days
  • Top authors: limestreet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,296 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by Advanced Google Maps Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.51 ▲2.09
Dashboard /wp-admin3.31 ▼0.0442.86 ▼14.50
Posts /wp-admin/edit.php3.36 ▲0.0142.60 ▼6.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.62 ▼22.89
Media Library /wp-admin/upload.php3.23 ▲0.0034.75 ▲1.67

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Google Maps Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.161.54 ▼0.0340.99 ▼2.26
Dashboard /wp-admin2,192 ▲125.51 ▼0.1481.65 ▼6.0737.72 ▼6.65
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0133.50 ▼4.5535.25 ▼0.25
Add New Post /wp-admin/post-new.php1,526 ▼923.65 ▲5.27686.01 ▲62.7051.87 ▼6.73
Media Library /wp-admin/upload.php1,403 ▲94.31 ▲0.1694.99 ▼1.9739.65 ▼5.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/advanced-google-maps-shortcode/advanced-google-maps-shortcode.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
5 plugin tags: multiple markers, map styling, google maps, shortcode, google maps shortcode

advanced-google-maps-shortcode/advanced-google-maps-shortcode.php Passed 13 tests

"Advanced Google Maps Shortcode" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
98 characters long description:
Really advanced Google Maps shortcode. Map styling, multiple markers, markers clustering and more.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin849 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4217500715
PHP14744134

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/pin.png0.74KB0.79KB0.00%