72% 5-anker-connect

Code Review | 5 Anker Connect

WordPress plugin 5 Anker Connect scored 72% from 54 tests.

About plugin

  • Plugin page: 5-anker-connect
  • Plugin version: 1.2.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.9
  • WordPress version: 5.9.2
  • First release: Sep 22, 2020
  • Latest release: Mar 16, 2022
  • Number of updates: 21
  • Update frequency: every 25.7 days
  • Top authors: 5anker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 769 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.39MB] [CPU: ▼297.06ms] Passed 4 tests

This is a short check of server-side resources used by 5 Anker Connect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.4458.85 ▲2.26
Dashboard /wp-admin3.79 ▲0.3839.62 ▲3.28
Posts /wp-admin/edit.php4.04 ▲0.4045.56 ▲1.21
Add New Post /wp-admin/post-new.php7.33 ▲0.36103.06 ▼1,194.99
Media Library /wp-admin/upload.php3.73 ▲0.4428.00 ▲3.57
5 Anker Connect /wp-admin/options-general.php?page=5-anker-connect3.6425.97

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 143 new files
Database: no new tables, 1 new option
New WordPress options
connect_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for 5 Anker Connect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲6618.12 ▲2.157.07 ▲0.502.19 ▼0.68
Dashboard /wp-admin2,917 ▲668.01 ▲1.68155.34 ▲14.05153.71 ▼8.56
Posts /wp-admin/edit.php2,715 ▲215.19 ▲1.75104.98 ▲40.84155.72 ▲11.91
Add New Post /wp-admin/post-new.php1,803 ▲13719.08 ▼1.76468.35 ▲39.10162.51 ▲0.96
Media Library /wp-admin/upload.php1,721 ▲236.84 ▲1.11170.07 ▲26.58199.68 ▲19.27
5 Anker Connect /wp-admin/options-general.php?page=5-anker-connect1,1044.5594.73113.09

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
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • connect_options

Smoke tests 25% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/5-anker-connect/admin/partials/anker-connect-admin-display.php
    • > /wp-content/plugins/5-anker-connect/public/partials/anker-connect-public-display.php
  • 40× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/5-anker-connect/lib/blocks/wls-planbar-login.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/5-anker-connect/lib/blocks/wls-boats.php:62
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/5-anker-connect/lib/siteorigin/boats/boats.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/5-anker-connect/lib/blocks/wls-contact-form.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/5-anker-connect/templates/single-boat.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/5-anker-connect/lib/blocks/wls-boat-book-calendar.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/5-anker-connect/lib/blocks/wls-search-form.php:62
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/5-anker-connect/lib/siteorigin/marinas/marinas.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/5-anker-connect/lib/siteorigin/map/map.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/5-anker-connect/templates/single-basement.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=5-anker-connect
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=hoverIntent,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.9.2 2:1787 Uncaught TypeError: Cannot set properties of undefined (setting 'wrap')
    • > GET request to /wp-admin/options-general.php?page=5-anker-connect
    • > Javascript (severe) in unknown
    /wp-includes/js/dist/i18n.min.js?ver=30fcecb428a0e8383d3776bcdd3a7834 1:10087 Uncaught TypeError: Cannot read properties of undefined (reading 'defaultHooks')
    • > GET request to /wp-admin/options-general.php?page=5-anker-connect
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=5-anker-connect 201:8 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
    • > GET request to /wp-admin/options-general.php?page=5-anker-connect
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=5-anker-connect 207:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
    • > GET request to /wp-admin/options-general.php?page=5-anker-connect
    • > Javascript (severe) in unknown
    /wp-admin/js/common.min.js?ver=5.9.2 1:69 Uncaught TypeError: Cannot read properties of undefined (reading '__')
    • > GET request to /wp-admin/options-general.php?page=5-anker-connect
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=5-anker-connect 222:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: importer, charter, 5anker

5-anker-connect/anker-connect.php 92% from 13 tests

The main PHP script in "5 Anker Connect" version 1.2.6 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("5-anker-connect.php" instead of "anker-connect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected4,483 lines of code in 133 files:
LanguageFilesBlank linesComment linesLines of code
PHP746841,2353,111
JavaScript19143435930
CSS3637178183
PO File169171157
SVG101100
JSON2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.95
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.39
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes44
▷ Abstract classes00.00%
▷ Concrete classes44100.00%
▷ Final classes12.27%
Methods219
▷ Static methods83.65%
▷ Public methods18082.19%
▷ Protected methods3415.53%
▷ Private methods52.28%
Functions38
▷ Named functions3386.84%
▷ Anonymous functions513.16%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/blocks/wls-search-day/anker.png27.09KB14.03KB▼ 48.23%
lib/blocks/wls-search-watercamper/anker.png27.09KB14.03KB▼ 48.23%
lib/blocks/wls-search/anker.png27.09KB14.03KB▼ 48.23%