73% nwa

Code Review | Navionics WebAPI v2

WordPress plugin Navionics WebAPI v2 scored73%from 54 tests.

About plugin

  • Plugin page: nwa
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.2-5.2
  • WordPress version: 6.3.1
  • First release: Feb 24, 2017
  • Latest release: May 27, 2019
  • Number of updates: 5
  • Update frequency: every 164.2 days
  • Top authors: navionicsdevelopers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,675 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.11MB] [CPU: ▼5.56ms] Passed 4 tests

Server-side resources used by Navionics WebAPI v2
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1134.10 ▼5.16
Dashboard /wp-admin3.41 ▲0.1044.21 ▼4.50
Posts /wp-admin/edit.php3.53 ▲0.1743.96 ▼3.20
Add New Post /wp-admin/post-new.php6.02 ▲0.1379.71 ▼9.38
Media Library /wp-admin/upload.php3.34 ▲0.1034.11 ▲1.29
All Components /wp-admin/edit.php?post_type=navionics_webapi3.3834.64
Add New /wp-admin/post-new.php?post_type=navionics_webapi3.3438.49

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 66 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Navionics WebAPI v2
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲16013.98 ▼0.704.76 ▲2.6136.66 ▼10.15
Dashboard /wp-admin2,237 ▲465.91 ▲1.02110.01 ▲8.2941.71 ▼1.13
Posts /wp-admin/edit.php2,123 ▲341.99 ▲0.0136.70 ▼0.2033.71 ▲1.35
Add New Post /wp-admin/post-new.php1,555 ▲2223.18 ▼0.23659.66 ▼11.0452.35 ▲2.03
Media Library /wp-admin/upload.php1,422 ▲344.21 ▲0.0297.25 ▲2.4641.43 ▼2.36
All Components /wp-admin/edit.php?post_type=navionics_webapi1,1041.9534.3129.57
Add New /wp-admin/post-new.php?post_type=navionics_webapi1,5672.5750.0058.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=navionics_webapi
    • > Warning in wp-content/plugins/nwa/includes/class-webapi-meta-box.php+78
    _() expects exactly 1 parameter, 2 given

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/nwa/admin/partials/nwa-admin-display.php
    • > /wp-content/plugins/nwa/trunk/admin/partials/nwa-admin-display.php
    • > /wp-content/plugins/nwa/public/partials/nwa-public-display.php
    • > /wp-content/plugins/nwa/trunk/admin/partials/nwa-scripts-template.php
    • > /wp-content/plugins/nwa/admin/partials/nwa-scripts-template.php
    • > /wp-content/plugins/nwa/trunk/public/partials/nwa-public-display.php
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nwa/admin/partials/nwa-scripts-template.php on line 13
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/nwa/admin/partials/nwa-scripts-template.php on line 12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nwa/trunk/admin/partials/nwa-scripts-template.php on line 13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nwa/admin/partials/nwa-scripts-template.php on line 12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nwa/trunk/admin/partials/nwa-scripts-template.php on line 12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nwa/trunk/admin/partials/nwa-scripts-template.php on line 7
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/nwa/admin/partials/nwa-scripts-template.php on line 13
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/nwa/trunk/admin/partials/nwa-scripts-template.php on line 13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nwa/admin/partials/nwa-scripts-template.php on line 7
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/nwa/trunk/admin/partials/nwa-scripts-template.php on line 7

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #2, #3 in nwa/assets to your readme.txt
You can take inspiration from this readme.txt

nwa/nwa.php Passed 13 tests

The main file in "Navionics WebAPI v2" v. 0.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
42 characters long description:
Show Navionics Maps on your Wordpress Site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin412 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP14176601388
JavaScript4126016
Sass2008
CSS44120

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods66
▷ Static methods46.06%
▷ Public methods5684.85%
▷ Protected methods00.00%
▷ Private methods1015.15%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.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
There were not PNG files found in your plugin