84% opengraph

Code Review | Open Graph

WordPress plugin Open Graph scored84%from 54 tests.

About plugin

  • Plugin page: opengraph
  • Plugin version: 1.11.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-6.4
  • WordPress version: 6.3.1
  • First release: Apr 24, 2010
  • Latest release: Nov 13, 2023
  • Number of updates: 52
  • Update frequency: every 95.2 days
  • Top authors: willnorris (73.08%)pfefferle (28.85%)

Code review

54 tests

User reviews

11 reviews

Install metrics

9,000+ active /132,758 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.37ms] Passed 4 tests

Server-side resources used by Open Graph
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1344.18 ▲4.15
Dashboard /wp-admin3.37 ▲0.0748.07 ▼3.83
Posts /wp-admin/edit.php3.44 ▲0.0849.56 ▼1.33
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.26 ▼4.47
Media Library /wp-admin/upload.php3.29 ▲0.0636.83 ▲6.91

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Open Graph
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4014.48 ▲0.211.84 ▲0.1543.41 ▲0.10
Dashboard /wp-admin2,198 ▲215.56 ▼0.0694.58 ▲3.8843.13 ▲0.13
Posts /wp-admin/edit.php2,100 ▲32.15 ▲0.2039.64 ▲1.5535.29 ▼1.94
Add New Post /wp-admin/post-new.php1,526 ▼023.25 ▲0.31660.41 ▼18.0248.61 ▼8.43
Media Library /wp-admin/upload.php1,403 ▲94.29 ▲0.17104.25 ▲8.5944.07 ▲3.13

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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
Good news, no errors were detected

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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/opengraph/opengraph.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: social, opengraph, ogp, facebook

opengraph/opengraph.php Passed 13 tests

The main PHP file in "Open Graph" ver. 1.11.2 adds more information about the plugin and also serves as the entry point for this plugin
38 characters long description:
Adds Open Graph metadata to your pages

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected372 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1113121372

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected