78% beacon-inbound-manager

Code Review | Beacon Inbound Manager

WordPress plugin Beacon Inbound Manager scored78%from 54 tests.

About plugin

  • Plugin page: beacon-inbound-ma...
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.8
  • WordPress version: 6.3.1
  • First release: Jul 27, 2017
  • Latest release: Jul 27, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: CottonEyeJoe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /841 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.73ms] Passed 4 tests

A check of server-side resources used by Beacon Inbound Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.75 ▲0.29
Dashboard /wp-admin3.33 ▲0.0343.61 ▼5.01
Posts /wp-admin/edit.php3.38 ▲0.0245.41 ▼3.44
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.12 ▼3.49
Media Library /wp-admin/upload.php3.25 ▲0.0231.27 ▼2.98
New beacon /wp-admin/post-new.php?post_type=beacon3.2639.55
All beacons /wp-admin/edit.php?post_type=beacon3.2935.48

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Beacon Inbound Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲13013.25 ▼1.132.11 ▲0.3040.72 ▼6.14
Dashboard /wp-admin2,257 ▲694.87 ▼0.05109.44 ▼4.5342.88 ▼3.81
Posts /wp-admin/edit.php2,140 ▲512.01 ▲0.0140.68 ▲0.6435.33 ▼0.11
Add New Post /wp-admin/post-new.php1,562 ▲2018.17 ▼0.13615.64 ▲3.9953.91 ▲6.23
Media Library /wp-admin/upload.php1,437 ▲494.19 ▼0.0297.28 ▼2.5641.63 ▼0.72
New beacon /wp-admin/post-new.php?post_type=beacon1,7832.6450.3157.25
All beacons /wp-admin/edit.php?post_type=beacon1,1281.9730.7329.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-location-city
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-location-coordinates
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-location-description
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-url-beacon
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-url-destination
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-settings-password
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-settings-start
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-settings-stop
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-settings-interval
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-settings-power
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-hw-model
    • > GET request to /wp-admin/post-new.php?post_type=beacon
    • > Notice in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php+286
    Undefined index: bim-meta-hw-mac

SRP 50% 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
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_action() in wp-content/plugins/beacon-inbound-manager/beacon-inbound-manager.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

beacon-inbound-manager/beacon-inbound-manager.php Passed 13 tests

The main PHP file in "Beacon Inbound Manager" ver. 1.00 adds more information about the plugin and also serves as the entry point for this plugin
74 characters long description:
Manage your BLE Beacons to generate inbound traffic to your landing pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin557 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
SVG222276
PHP164123198
PO File1293073
Markdown17010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.41MB with 0.29MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png115.48KB32.88KB▼ 71.53%
assets/screenshot-1.png115.16KB33.73KB▼ 70.71%
assets/screenshot-3.png189.72KB52.57KB▼ 72.29%