94% tedtalks-embedder

Code Review | TEDTalks Embedder

WordPress plugin TEDTalks Embedder scored 94% from 54 tests.

About plugin

  • Plugin page: tedtalks-embedder
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 5.9.2
  • First release: Apr 17, 2011
  • Latest release: Apr 27, 2019
  • Number of updates: 27
  • Update frequency: every 108.9 days
  • Top authors: samuelaguilera (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 8,649 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by TEDTalks Embedder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0157.34 ▲2.63
Dashboard /wp-admin3.42 ▲0.0142.24 ▲1.51
Posts /wp-admin/edit.php3.65 ▲0.0138.68 ▼3.74
Add New Post /wp-admin/post-new.php6.89 ▼0.0897.09 ▼1,251.89
Media Library /wp-admin/upload.php3.30 ▲0.0129.80 ▲6.32

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for TEDTalks Embedder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲4115.82 ▼0.216.62 ▲0.862.13 ▼0.57
Dashboard /wp-admin2,895 ▲346.11 ▼0.10136.22 ▲5.10153.22 ▼10.61
Posts /wp-admin/edit.php2,694 ▲93.24 ▼0.1370.08 ▲8.11149.65 ▲4.56
Add New Post /wp-admin/post-new.php1,717 ▲5620.89 ▲4.72432.79 ▼8.17193.80 ▲44.70
Media Library /wp-admin/upload.php1,697 ▲25.49 ▼0.00141.19 ▼2.00217.70 ▲28.36

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
The plugin uninstalled successfully, without leaving any zombie files or tables

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tedtalks-embedder/tedtalks.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_oembed_add_provider() in wp-content/plugins/tedtalks-embedder/inc/ted.php:13

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: ted, talks, oembed, tedtalks, tedx

tedtalks-embedder/tedtalks.php 85% from 13 tests

The principal PHP file in "TEDTalks Embedder" v. 2.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("tedtalks-embedder.php" instead of "tedtalks.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected97 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2382997

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin