84% maps-block-apple

Code Review | Block for Apple Maps

WordPress plugin Block for Apple Maps scored84%from 54 tests.

About plugin

  • Plugin page: maps-block-apple
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Jun 26, 2020
  • Latest release: Nov 16, 2023
  • Number of updates: 12
  • Update frequency: every 103.7 days
  • Top authors: 10up (75%)10upbot (33.33%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /17,210 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.95ms] Passed 4 tests

Analyzing server-side resources used by Block for Apple Maps
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.31 ▼7.11
Dashboard /wp-admin3.34 ▼0.0046.94 ▼13.88
Posts /wp-admin/edit.php3.40 ▲0.0448.57 ▲3.27
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.60 ▼10.08
Media Library /wp-admin/upload.php3.27 ▲0.0451.78 ▲19.48
Block for Apple Maps /wp-admin/options-general.php?page=block-for-apple-maps3.2435.65

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Block for Apple Maps
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲5814.14 ▼0.261.72 ▲0.0839.51 ▼4.19
Dashboard /wp-admin2,193 ▲135.51 ▼0.1498.35 ▼1.7543.76 ▲0.29
Posts /wp-admin/edit.php2,101 ▲11.97 ▲0.0238.87 ▼0.6435.53 ▼1.06
Add New Post /wp-admin/post-new.php6,375 ▲4,84929.69 ▲6.54877.06 ▲157.9737.10 ▼20.60
Media Library /wp-admin/upload.php1,401 ▲14.21 ▲0.07106.91 ▲3.4868.88 ▲21.33
Block for Apple Maps /wp-admin/options-general.php?page=block-for-apple-maps9793.1665.8339.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-comments
    • maps_block_apple_key_id
    • maps_block_apple_team_id
    • maps_block_apple_private_key
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Even though everything seems fine, this is not 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 tenup\\Maps_Block_Apple\\add_action() in wp-content/plugins/maps-block-apple/includes/block-assets.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tenup\\Maps_Block_Apple\\add_action() in wp-content/plugins/maps-block-apple/includes/rest-routes.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tenup\\Maps_Block_Apple\\plugin_dir_url() in wp-content/plugins/maps-block-apple/maps-block-apple.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 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
3 plugin tags: apple maps, block, map block

maps-block-apple/maps-block-apple.php Passed 13 tests

"Block for Apple Maps" version 1.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
63 characters long description:
An Apple Maps block for the WordPress block editor (Gutenberg).

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
Good job! No executable or dangerous file extensions detected655 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP1097211482
JSON11094
CSS215062
Bourne Shell15413
JavaScript3003
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin