94% marcus-hiles-wistia-shortcodes

Code Review | Marcus Hiles Wistia Shortcodes

WordPress plugin Marcus Hiles Wistia Shortcodes scored 94% from 54 tests.

About plugin

  • Plugin page: marcus-hiles-wist...
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0
  • WordPress version: 5.8.1
  • First release: Jul 18, 2018
  • Latest release: Jan 21, 2019
  • Number of updates: 8
  • Update frequency: every 24.1 days
  • Top authors: marcushiles (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,189 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Marcus Hiles Wistia Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0527.48 ▲4.56
Dashboard /wp-admin3.11 ▲0.0433.52 ▼18.61
Posts /wp-admin/edit.php3.17 ▲0.0531.80 ▼9.23
Add New Post /wp-admin/post-new.php5.47 ▲0.0368.17 ▼576.16
Media Library /wp-admin/upload.php3.06 ▲0.0526.62 ▼3.29

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Marcus Hiles Wistia Shortcodes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6516.01 ▲0.894.89 ▼0.8377.30 ▲4.19
Dashboard /wp-admin2,930 ▲356.07 ▼0.11115.51 ▼59.95179.67 ▼81.28
Posts /wp-admin/edit.php2,740 ▼13.24 ▲0.1371.99 ▼7.70149.33 ▼9.81
Add New Post /wp-admin/post-new.php3,744 ▲4518.50 ▲0.56582.14 ▼49.86236.47 ▲8.86
Media Library /wp-admin/upload.php1,749 ▼35.51 ▼0.02164.09 ▲4.44219.03 ▲11.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors 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: Call to undefined function add_shortcode() in wp-content/plugins/marcus-hiles-wistia-shortcodes/shortcodes.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: block, gutenberg, wistia, blocks

marcus-hiles-wistia-shortcodes/plugin.php 85% from 13 tests

The primary PHP file in "Marcus Hiles Wistia Shortcodes" version 1.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("marcus-hiles-wistia-shortcodes.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin316 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP47835240
CSS281375
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity13.67
▷ Minimum class complexity5.00
▷ Maximum class complexity28.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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