94% abd-dashboard-widget-manager

Code Review | ABD Dashboard Widget Manager

WordPress plugin ABD Dashboard Widget Manager scored 94% from 54 tests.

About plugin

  • Plugin page: abd-dashboard-wid...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9.2
  • WordPress version: 5.9.2
  • First release: Apr 18, 2013
  • Latest release: Aug 11, 2014
  • Number of updates: 9
  • Update frequency: every 54.6 days
  • Top authors: abdwebdesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active / 9,913 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.04MB] [CPU: ▼310.60ms] Passed 4 tests

A check of server-side resources used by ABD Dashboard Widget Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.60 ▲5.46
Dashboard /wp-admin3.30 ▼0.1126.07 ▼12.47
Posts /wp-admin/edit.php3.65 ▲0.0136.72 ▲1.90
Add New Post /wp-admin/post-new.php6.90 ▼0.0790.68 ▼1,227.82
Media Library /wp-admin/upload.php3.30 ▲0.0122.08 ▼4.01
Dashboard Manager /wp-admin/options-general.php?page=abd_dwm_settings3.3326.70

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 5 new options
New WordPress options
abd_dwm_avail_dashboard_widgets
abd_dwm_show_widgets
abd_dwm_user_roles
abd_dwm_widget_content
abd_dwm_widget_title

Browser metrics Passed 4 tests

Checking browser requirements for ABD Dashboard Widget Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,591 ▼1,16715.07 ▼0.537.49 ▲1.602.52 ▼0.14
Dashboard /wp-admin1,694 ▼1,1645.58 ▼0.60108.26 ▼25.96142.92 ▼23.67
Posts /wp-admin/edit.php2,695 ▲43.23 ▼0.0066.72 ▲2.88138.94 ▼5.58
Add New Post /wp-admin/post-new.php1,684 ▼620.95 ▲0.40430.59 ▼12.99165.62 ▲4.59
Media Library /wp-admin/upload.php1,705 ▲45.52 ▲0.02137.86 ▼7.25185.90 ▼4.62
Dashboard Manager /wp-admin/options-general.php?page=abd_dwm_settings2,0898.81156.78163.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/abd-dashboard-widget-manager/abd_dashboard_widget_manager.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/abd-dashboard-widget-manager/abd_dashboard_widget_manager.php:11

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 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: dashboard, custom dashboard, administrator dashboard, widget manager, custom widget...

abd-dashboard-widget-manager/abd_dashboard_widget_manager.php 85% from 13 tests

The principal PHP file in "ABD Dashboard Widget Manager" v. 1.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("abd-dashboard-widget-manager.php" instead of "abd_dashboard_widget_manager.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 285 characters long)

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
Good job! No executable or dangerous file extensions detected285 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2329245
CSS110140

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected