88% shared-whiteboard

Code Review | Shared Whiteboard

WordPress plugin Shared Whiteboard scored 88% from 54 tests.

About plugin

  • Plugin page: shared-whiteboard
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6.1
  • WordPress version: 5.9.2
  • First release: Sep 23, 2013
  • Latest release: Dec 4, 2013
  • Number of updates: 6
  • Update frequency: every 12.2 days
  • Top authors: senko (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 3,220 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼290.38ms] Passed 4 tests

Server-side resources used by Shared Whiteboard
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.5060.89 ▲42.23
Dashboard /wp-admin3.48 ▲0.0894.33 ▲4.90
Posts /wp-admin/edit.php3.71 ▲0.0742.00 ▼2.47
Add New Post /wp-admin/post-new.php6.95 ▼0.0196.49 ▼1,157.79
Media Library /wp-admin/upload.php3.36 ▲0.0725.71 ▼6.14
Shared Whiteboard /wp-admin/options-general.php?page=AWWApp3.3229.84

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 1 new option
New WordPress options
AWWApp_options

Browser metrics Passed 4 tests

A check of browser resources used by Shared Whiteboard
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /683 ▼3,0715.36 ▼10.6310.16 ▲4.252.80 ▲0.14
Dashboard /wp-admin2,883 ▲226.12 ▼0.05119.03 ▼14.68155.33 ▼12.90
Posts /wp-admin/edit.php2,693 ▲23.24 ▼0.0063.12 ▲0.67181.08 ▲3.12
Add New Post /wp-admin/post-new.php1,972 ▲26116.88 ▼4.39425.18 ▼21.61160.11 ▲2.99
Media Library /wp-admin/upload.php1,694 ▼45.55 ▲0.03165.41 ▲28.22187.31 ▼1.10
Shared Whiteboard /wp-admin/options-general.php?page=AWWApp1,4282.3953.07133.97

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=AWWApp
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=AWWApp
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=AWWApp
    • > Notice in wp-content/plugins/shared-whiteboard/awwapp.php+362
    Undefined index: singleBoardId

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/shared-whiteboard/admin/mce_dialog.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/shared-whiteboard/admin/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/shared-whiteboard/awwapp.php:32
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/shared-whiteboard/admin/options_table.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: widget, canvas, posts, post, board...

shared-whiteboard/awwapp.php 77% from 13 tests

The main PHP file in "Shared Whiteboard" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 190 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("shared-whiteboard.php" instead of "awwapp.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected620 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP47750339
JavaScript33211154
PO File14040104
CSS24023

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1487.50%
▷ Protected methods212.50%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon-32.png1.18KB0.85KB▼ 27.94%
admin/images/icon-20.png0.88KB0.65KB▼ 25.78%