84% datawrapper-oembed

Code Review | Datawrapper oEmbed

WordPress plugin Datawrapper oEmbed scored84%from 54 tests.

About plugin

  • Plugin page: datawrapper-oembed
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.1
  • WordPress version: 6.3.1
  • First release: Jun 9, 2020
  • Latest release: Apr 29, 2021
  • Number of updates: 9
  • Update frequency: every 36.0 days
  • Top authors: drivenbydata (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /4,013 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Datawrapper oEmbed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.02 ▼4.16
Dashboard /wp-admin3.31 ▲0.0145.76 ▼6.97
Posts /wp-admin/edit.php3.36 ▲0.0148.80 ▼5.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.67 ▼25.39
Media Library /wp-admin/upload.php3.24 ▲0.0135.61 ▼0.38

Server storage [IO: ▲0.02MB] [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: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Datawrapper oEmbed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.101.87 ▼0.0547.10 ▲3.76
Dashboard /wp-admin2,189 ▲125.62 ▲0.0292.93 ▼5.0341.98 ▼0.59
Posts /wp-admin/edit.php2,100 ▲31.97 ▼0.0441.68 ▲4.2634.73 ▲1.96
Add New Post /wp-admin/post-new.php1,526 ▼223.15 ▲0.16659.08 ▲18.5059.67 ▼0.72
Media Library /wp-admin/upload.php1,403 ▲34.29 ▲0.12101.88 ▼0.3343.74 ▼2.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/datawrapper-oembed/datawrapper-oembed.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: data visualizaton, oembed

datawrapper-oembed/datawrapper-oembed.php Passed 13 tests

This is the main PHP file of "Datawrapper oEmbed" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
123 characters long description:
Registers Datawrapper as oembed provider so charts, maps, and tables created with Datawrapper can be embedded in WordPress.

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
Everything looks great! No dangerous files found in this plugin286 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
Markdown1580281
PHP13145

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin