93% dx-getty-images-oembed

Code Review | DX oEmbed for Getty Images

WordPress plugin DX oEmbed for Getty Images scored 93% from 54 tests.

About plugin

  • Plugin page: dx-getty-images-o...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7
  • WordPress version: 5.8.1
  • First release: May 24, 2016
  • Latest release: Dec 20, 2016
  • Number of updates: 8
  • Update frequency: every 26.4 days
  • Top authors: devrix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 828 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by DX oEmbed for Getty Images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0133.82 ▼3.85
Dashboard /wp-admin3.07 ▲0.0148.37 ▲9.60
Posts /wp-admin/edit.php3.12 ▲0.0143.08 ▼2.63
Add New Post /wp-admin/post-new.php5.43 ▲0.00100.81 ▼532.35
Media Library /wp-admin/upload.php3.01 ▲0.0131.86 ▼1.64

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for DX oEmbed for Getty Images
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8415.88 ▲0.3710.36 ▲0.6245.25 ▼5.20
Dashboard /wp-admin2,967 ▲335.93 ▼0.05141.33 ▼3.52111.61 ▼2.99
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0067.20 ▲2.0585.65 ▼4.53
Add New Post /wp-admin/post-new.php1,683 ▼19318.71 ▼0.48432.52 ▲19.41112.71 ▲5.55
Media Library /wp-admin/upload.php1,822 ▼05.02 ▲0.02162.27 ▼7.68113.21 ▼4.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

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 | 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/dx-getty-images-oembed/dx-getty-images-oembed.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
6 plugin tags: pictures, media, plugin, oembed, getty images...

dx-getty-images-oembed/dx-getty-images-oembed.php 77% from 13 tests

"DX oEmbed for Getty Images" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 159 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/lang" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin39 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP291939

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
No PNG files were detected