84% scorecard-widget-for-salesforce-trailhead

Code Review | Trailhead & Salesforce Certifications Scorecard

WordPress plugin Trailhead & Salesforce Certifications Scorecard scored84%from 54 tests.

About plugin

  • Plugin page: scorecard-widget-...
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2019
  • Latest release: Jun 26, 2021
  • Number of updates: 23
  • Update frequency: every 32.3 days
  • Top authors: abhimanyud3dx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /700 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
This plugin's installer ran successfully

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

Server-side resources used by Trailhead & Salesforce Certifications Scorecard
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0333.52 ▼3.32
Dashboard /wp-admin3.34 ▼0.0152.60 ▼5.15
Posts /wp-admin/edit.php3.39 ▲0.0348.14 ▼2.61
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.68 ▼17.92
Media Library /wp-admin/upload.php3.26 ▲0.0332.02 ▼3.02

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_sf_trailhead_scorecard_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Trailhead & Salesforce Certifications Scorecard
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2813.95 ▼0.421.75 ▲0.0041.74 ▼0.75
Dashboard /wp-admin2,198 ▲185.62 ▼0.0487.55 ▼0.9638.55 ▼3.23
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0235.79 ▼1.5432.82 ▼1.54
Add New Post /wp-admin/post-new.php1,528 ▲223.24 ▲0.26665.88 ▼3.9053.34 ▼0.14
Media Library /wp-admin/upload.php1,397 ▼34.15 ▼0.0596.22 ▼21.4841.92 ▼6.70

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: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_sf_trailhead_scorecard_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/scorecard-widget-for-salesforce-trailhead/scorecard-widget-for-salesforce-trailhead.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: Please take inspiration from this readme.txt

scorecard-widget-for-salesforce-trailhead/scorecard-widget-for-salesforce-trailhead.php 92% from 13 tests

The primary PHP file in "Trailhead & Salesforce Certifications Scorecard" version 2.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 246 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin71 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191971

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin