84% twitchpress-embed-everything

Code Review | TwitchPress Embed Everything

WordPress plugin TwitchPress Embed Everything scored 84% from 54 tests.

About plugin

  • Plugin page: twitchpress-embed...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Oct 23, 2017
  • Latest release: Sep 10, 2018
  • Number of updates: 8
  • Update frequency: every 102.9 days
  • Top authors: Ryan Bayne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,070 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.62ms] Passed 4 tests

A check of server-side resources used by TwitchPress Embed Everything
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.79 ▼6.67
Dashboard /wp-admin3.31 ▲0.0045.11 ▼3.05
Posts /wp-admin/edit.php3.42 ▲0.0747.07 ▲2.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.41 ▼4.84
Media Library /wp-admin/upload.php3.23 ▲0.0034.48 ▲0.10

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by TwitchPress Embed Everything
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.66 ▼0.575.33 ▲3.5441.30 ▲0.62
Dashboard /wp-admin2,203 ▲155.83 ▼0.0795.16 ▼8.9940.34 ▼1.40
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0435.69 ▼5.0330.89 ▼1.14
Add New Post /wp-admin/post-new.php1,534 ▲923.36 ▲0.35634.64 ▼42.1958.09 ▲5.67
Media Library /wp-admin/upload.php1,385 ▼64.18 ▼0.0399.83 ▼3.6942.16 ▼3.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/twitchpress-embed-everything/twitchpress-embed-everything.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: embed twitch chat, embed everything, twitchpress extension, twitch embed, embed twitch stream...

twitchpress-embed-everything/twitchpress-embed-everything.php 85% from 13 tests

"TwitchPress Embed Everything" version 1.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected154 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP279182154

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods314.29%
▷ Public methods1676.19%
▷ Protected methods14.76%
▷ Private methods419.05%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin