84% touchcast-embed

Code Review | TouchCast Embed Plugin (beta)

WordPress plugin TouchCast Embed Plugin (beta) scored84%from 54 tests.

About plugin

  • Plugin page: touchcast-embed
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 28, 2014
  • Latest release: Jan 10, 2017
  • Number of updates: 31
  • Update frequency: every 34.8 days
  • Top authors: TouchCast (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

10+ active /2,398 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.46ms] Passed 4 tests

Analyzing server-side resources used by TouchCast Embed Plugin (beta)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0149.44 ▲8.07
Dashboard /wp-admin3.32 ▲0.0243.44 ▼6.15
Posts /wp-admin/edit.php3.37 ▲0.0148.52 ▲0.44
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.57 ▼5.11
Media Library /wp-admin/upload.php3.24 ▲0.0135.10 ▲1.00

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by TouchCast Embed Plugin (beta)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.511.90 ▲0.0541.67 ▼2.71
Dashboard /wp-admin2,203 ▲155.83 ▼0.0699.96 ▼16.4438.06 ▼10.68
Posts /wp-admin/edit.php2,092 ▲62.04 ▲0.0338.98 ▲0.9533.72 ▼1.10
Add New Post /wp-admin/post-new.php1,521 ▼1223.05 ▼0.03619.03 ▼75.2948.54 ▼7.76
Media Library /wp-admin/upload.php1,388 ▲34.16 ▼0.05100.32 ▲3.5343.72 ▲2.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/touchcast-embed/ui/ui.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/touchcast-embed/ui/ui.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/touchcast-embed/admin/admin.php:37

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 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

touchcast-embed/touchcast.php 92% from 13 tests

"TouchCast Embed Plugin (beta)" version 2.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("touchcast-embed.php" instead of "touchcast.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin194 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3153286
JavaScript27558
HTML11750

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions8
▷ Named functions8100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
tinymce/appicon.png3.36KB1.18KB▼ 64.89%