78% sweet-custom-dashboard

Code Review | Sweet Custom Dashboard

WordPress plugin Sweet Custom Dashboard scored78%from 54 tests.

About plugin

  • Plugin page: sweet-custom-dash...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Dec 6, 2012
  • Latest release: Dec 6, 2012
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: corsonr (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

900+ active /10,576 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.03MB] [CPU: ▼13.92ms] Passed 4 tests

This is a short check of server-side resources used by Sweet Custom Dashboard
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.70 ▼2.21
Dashboard /wp-admin3.20 ▼0.1533.73 ▼30.59
Posts /wp-admin/edit.php3.37 ▲0.0148.55 ▼3.94
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.65 ▼18.93
Media Library /wp-admin/upload.php3.24 ▲0.0134.94 ▲0.11
Custom Dashboard /wp-admin/index.php?page=custom-dashboard3.2130.16

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Sweet Custom Dashboard
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,455 ▼1,30610.25 ▼4.482.08 ▲0.0838.60 ▼5.01
Dashboard /wp-admin829 ▼1,3482.05 ▼3.5736.39 ▼56.1938.48 ▼9.95
Posts /wp-admin/edit.php2,101 ▲12.03 ▲0.0434.81 ▼4.7734.76 ▼4.90
Add New Post /wp-admin/post-new.php1,682 ▲15422.36 ▼0.62666.46 ▲35.4630.32 ▼20.49
Media Library /wp-admin/upload.php1,404 ▲44.13 ▼0.04100.27 ▼6.6747.99 ▲1.06
Custom Dashboard /wp-admin/index.php?page=custom-dashboard8092.1823.9838.79

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/sweet-custom-dashboard/custom_dashboard.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sweet-custom-dashboard/sweet-custom-dashboard.php:21
    • > PHP Warning
      require_once(ABSPATHwp-load.php): failed to open stream: No such file or directory in wp-content/plugins/sweet-custom-dashboard/custom_dashboard.php on line 7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sweet-custom-dashboard/custom_dashboard.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/index.php?page=custom-dashboard
    • > Network (severe)
    wp-admin/images/screenshots/theme-customizer.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Preview a custom WordPress dashboard) image required
The official readme.txt might help

sweet-custom-dashboard/sweet-custom-dashboard.php 92% from 13 tests

The main PHP file in "Sweet Custom Dashboard" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

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 plugin58 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2313258

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin