84% ted-in-bed

Code Review | TED in bed

WordPress plugin TED in bed scored84%from 54 tests.

About plugin

  • Plugin page: ted-in-bed
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9
  • WordPress version: 6.3.1
  • First release: Apr 1, 2013
  • Latest release: Apr 17, 2014
  • Number of updates: 8
  • Update frequency: every 47.5 days
  • Top authors: gawain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,714 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by TED in bed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.40 ▼5.01
Dashboard /wp-admin3.31 ▼0.0345.74 ▼12.20
Posts /wp-admin/edit.php3.36 ▲0.0144.74 ▼4.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.46 ▼8.96
Media Library /wp-admin/upload.php3.24 ▲0.0137.72 ▲0.53

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

TED in bed: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.27 ▼0.461.72 ▲0.0136.78 ▼3.26
Dashboard /wp-admin2,195 ▲215.54 ▼0.1081.76 ▼4.5739.98 ▼0.62
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0637.63 ▲1.5834.37 ▼3.72
Add New Post /wp-admin/post-new.php1,526 ▼1123.29 ▲4.94647.55 ▲8.2066.11 ▼4.26
Media Library /wp-admin/upload.php1,400 ▼34.23 ▲0.0495.94 ▲2.7542.95 ▼1.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_oembed_add_provider() in wp-content/plugins/ted-in-bed/ted-in-bed.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === ted-in-bed === )
The official readme.txt might help

ted-in-bed/ted-in-bed.php Passed 13 tests

The entry point to "TED in bed" version 1.1 is a PHP file that has certain tags in its header comment area
77 characters long description:
Enable TED video URLs to be embedded in WordPress via the internal oEmbed API

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1104119

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions2
▷ Named functions2100.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
There are no PNG files in this plugin