84% oembed-infogram

Code Review | oEmbed Infogram

WordPress plugin oEmbed Infogram scored84%from 54 tests.

About plugin

  • Plugin page: oembed-infogram
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: May 10, 2022
  • Latest release: Jul 21, 2023
  • Number of updates: 12
  • Update frequency: every 36.3 days
  • Top authors: rafaucau (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,105 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by oEmbed Infogram
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.90 ▲7.60
Dashboard /wp-admin3.33 ▼0.0250.58 ▼6.96
Posts /wp-admin/edit.php3.38 ▲0.0244.55 ▼7.16
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.50 ▼20.96
Media Library /wp-admin/upload.php3.25 ▲0.0231.25 ▼3.73

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for oEmbed Infogram
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.095.30 ▲3.4253.29 ▲9.32
Dashboard /wp-admin2,206 ▲204.85 ▼0.08115.79 ▲1.7244.02 ▼0.47
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0439.57 ▼2.5536.23 ▼1.44
Add New Post /wp-admin/post-new.php1,536 ▲1923.31 ▲5.75614.70 ▲19.7158.43 ▲7.89
Media Library /wp-admin/upload.php1,379 ▼124.27 ▲0.0399.22 ▼0.6241.77 ▼3.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'AMP_Base_Embed_Handler' not found in wp-content/plugins/oembed-infogram/class-amp-infogram-oembed-handler.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

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

The primary PHP file in "oEmbed Infogram" version 1.1.3 is used by WordPress to initiate all plugin functionality
57 characters long description:
A simple plugin that adds support for embedding Infogram.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected87 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3263787

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.50
▷ Minimum class complexity4.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods777.78%
▷ Protected methods111.11%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin