84% ap-google-maps

Code Review | Arrow Maps - Custom Maps for WordPress

WordPress plugin Arrow Maps - Custom Maps for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: ap-google-maps
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.3
  • WordPress version: 6.3.1
  • First release: Feb 27, 2017
  • Latest release: Sep 11, 2019
  • Number of updates: 37
  • Update frequency: every 25.0 days
  • Top authors: arrowplugins (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /7,595 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.62ms] Passed 4 tests

Analyzing server-side resources used by Arrow Maps - Custom Maps for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.16 ▲0.92
Dashboard /wp-admin3.38 ▲0.0844.95 ▼4.10
Posts /wp-admin/edit.php3.50 ▲0.1445.00 ▼3.12
Add New Post /wp-admin/post-new.php5.96 ▲0.0879.64 ▼19.67
Media Library /wp-admin/upload.php3.31 ▲0.0834.96 ▲0.40

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 223 new files
Database: no new tables, 7 new options
New WordPress options
arrow-google-maps-admin-options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Arrow Maps - Custom Maps for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.22 ▼1.152.76 ▲1.0040.99 ▼3.05
Dashboard /wp-admin2,215 ▲275.79 ▼0.1298.32 ▼2.4238.56 ▼4.25
Posts /wp-admin/edit.php2,101 ▲122.03 ▲0.0634.76 ▼7.8834.26 ▼0.34
Add New Post /wp-admin/post-new.php1,552 ▲1918.54 ▼4.59637.08 ▼20.0052.49 ▼2.96
Media Library /wp-admin/upload.php1,403 ▲154.24 ▲0.1097.95 ▼7.6145.28 ▲2.33

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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • arrow-google-maps-admin-options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
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 get_option() in wp-content/plugins/ap-google-maps/arrow-google-maps.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

ap-google-maps/arrow-google-maps.php 92% from 13 tests

"Arrow Maps - Custom Maps for WordPress" version 1.0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ap-google-maps.php" instead of "arrow-google-maps.php")

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
There were no executable files found in this plugin1,671 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP118062826
HTML18327463
SVG300231
JavaScript6130147
CSS4044

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.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%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
203 compressed PNG files occupy 5.95MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/admin/styles/93.png61.39KB52.88KB▼ 13.86%
img/admin/styles/65.png66.51KB57.66KB▼ 13.31%
img/icons/90.png1.90KB1.51KB▼ 20.17%
img/icons/12.png1.20KB1.49KB0.00%
img/icons/79.png1.86KB1.56KB▼ 16.09%