78% wp-open-graph-protocol

Code Review | WP Open Graph Protocol

WordPress plugin WP Open Graph Protocol scored78%from 54 tests.

About plugin

  • Plugin page: wp-open-graph-pro...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 14, 2018
  • Latest release: Apr 5, 2018
  • Number of updates: 4
  • Update frequency: every 5.2 days
  • Top authors: ejointjp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /545 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
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.80ms] Passed 4 tests

This is a short check of server-side resources used by WP Open Graph Protocol
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0629.90 ▼19.11
Dashboard /wp-admin3.42 ▲0.1150.61 ▲2.05
Posts /wp-admin/edit.php3.54 ▲0.1854.72 ▲2.26
Add New Post /wp-admin/post-new.php6.00 ▲0.1191.38 ▼7.46
Media Library /wp-admin/upload.php3.33 ▲0.0937.40 ▲1.33
WP Open Graph Protocol /wp-admin/options-general.php?page=wpogp-setting3.2932.83

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

WP Open Graph Protocol: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲22214.75 ▲0.381.86 ▼0.2243.32 ▲2.02
Dashboard /wp-admin2,349 ▲1616.42 ▲0.52132.17 ▲26.6639.10 ▼3.30
Posts /wp-admin/edit.php2,255 ▲1633.37 ▲1.3754.25 ▲11.3134.98 ▼2.50
Add New Post /wp-admin/post-new.php1,519 ▼017.65 ▼5.66579.55 ▼33.4826.30 ▼23.85
Media Library /wp-admin/upload.php1,394 ▲34.15 ▼0.0482.12 ▼19.8042.58 ▼1.52
WP Open Graph Protocol /wp-admin/options-general.php?page=wpogp-setting1,2133.0246.9828.20

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpogp-setting
    • > Notice in wp-content/plugins/wp-open-graph-protocol/wp-open-graph-protocol.php+329
    Trying to access array offset on value of type bool

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/wp-open-graph-protocol/wp-open-graph-protocol.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Add an image for screenshot #1 (Quotation sample.)
The official readme.txt might help

wp-open-graph-protocol/wp-open-graph-protocol.php Passed 13 tests

This is the main PHP file of "WP Open Graph Protocol" version 0.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
57 characters long description:
A WordPress plugin that makes Open Graph meta tag simply.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected574 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP210331480
PO File1162557
JavaScript111137

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods2362.16%
▷ Protected methods00.00%
▷ Private methods1437.84%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin