10% saama-custom-dashboard

Code Review | Saama Custom Dashboard

WordPress plugin Saama Custom Dashboard scored10%from 54 tests.

About plugin

  • Plugin page: saama-custom-dash...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.8
  • WordPress version: 6.3.1
  • First release: Aug 4, 2017
  • Latest release: Aug 6, 2017
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: usama12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /727 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/saama-custom-dashboard/scdashboard.php+50
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.23MB] [CPU: ▼11.65ms] Passed 4 tests

An overview of server-side resources used by Saama Custom Dashboard
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1838.73 ▼1.57
Dashboard /wp-admin3.53 ▲0.2344.72 ▼3.87
Posts /wp-admin/edit.php3.63 ▲0.2746.82 ▼9.41
Add New Post /wp-admin/post-new.php6.22 ▲0.3382.90 ▼31.73
Media Library /wp-admin/upload.php3.47 ▲0.2437.21 ▲1.09

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
scd_pages
scd_options
db_upgraded
widget_recent-posts
scd_role
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Saama Custom Dashboard
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.19 ▼0.101.58 ▲0.0844.87 ▲0.51
Dashboard /wp-admin2,208 ▲315.58 ▼0.0989.15 ▼5.7639.26 ▼2.71
Posts /wp-admin/edit.php2,119 ▲162.02 ▲0.0139.02 ▼4.6336.16 ▼0.06
Add New Post /wp-admin/post-new.php1,541 ▲523.11 ▲0.39605.74 ▼30.4756.56 ▼6.57
Media Library /wp-admin/upload.php1,419 ▲194.20 ▲0.0293.45 ▼21.9440.39 ▼10.18

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please take a closer look at the following
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/saama-custom-dashboard/scdashboard.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/saama-custom-dashboard/views/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/saama-custom-dashboard/shortcodes.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/saama-custom-dashboard/views/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/saama-custom-dashboard/include/scdadmin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/saama-custom-dashboard/views/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/saama-custom-dashboard/views/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/saama-custom-dashboard/views/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/saama-custom-dashboard/views/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/saama-custom-dashboard/views/header.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
You can look at the official readme.txt

saama-custom-dashboard/scdashboard.php 85% from 13 tests

The primary PHP file in "Saama Custom Dashboard" version 2.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("saama-custom-dashboard.php" instead of "scdashboard.php")
  • Description: The description should be shorter than 140 characters (currently 165 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,489 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP13205561,242
JavaScript1170195
CSS20552

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected