73% pluralsight-widget

Code Review | Pluralsight WordPress Widget

WordPress plugin Pluralsight WordPress Widget scored73%from 54 tests.

About plugin

  • Plugin page: pluralsight-widget
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.2.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2014
  • Latest release: May 4, 2015
  • Number of updates: 5
  • Update frequency: every 77.4 days
  • Top authors: jazzs3quence (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /823 total downloads

Benchmarks

Plugin footprint 65% from 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: ▼1.89MB] [CPU: ▼61.74ms] Passed 4 tests

This is a short check of server-side resources used by Pluralsight WordPress Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.55 ▼43.83
Dashboard /wp-admin2.12 ▼1.227.26 ▼59.74
Posts /wp-admin/edit.php2.13 ▼1.237.55 ▼43.77
Add New Post /wp-admin/post-new.php2.12 ▼3.768.23 ▼99.61
Media Library /wp-admin/upload.php2.12 ▼1.105.65 ▼33.19

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_pluralsight_widget
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Pluralsight WordPress Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.23 ▲0.042.15 ▲0.1344.83 ▲1.03
Dashboard /wp-admin2,189 ▲125.61 ▲0.0794.64 ▼8.5243.25 ▲1.80
Posts /wp-admin/edit.php2,100 ▼51.99 ▼0.0038.91 ▲2.0637.01 ▲3.99
Add New Post /wp-admin/post-new.php1,526 ▼220.82 ▼2.06635.25 ▼42.8458.60 ▲11.06
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.13100.28 ▼2.0041.28 ▼3.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/pluralsight-widget/public/class-pluralsight-wordpress-widget.php+64
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_pluralsight_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pluralsight-widget/includes/widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The Pluralsight Widget on the Widgets page), #2 (The widget in action!), #3 (An example shortcode usage), #4 (That shortcode in use)
You can look at the official readme.txt

pluralsight-widget/pluralsight-wordpress-widget.php 85% from 13 tests

The main file in "Pluralsight WordPress Widget" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pluralsight-widget.php" instead of "pluralsight-wordpress-widget.php")

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
No dangerous file extensions were detected314 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP581159267
Markdown136047

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods430.77%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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