78% open-graph-protocol-tools

Code Review | Open Graph Protocol Tools

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

About plugin

  • Plugin page: open-graph-protoc...
  • Plugin version: 1.91
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-5.5
  • WordPress version: 6.3.1
  • First release: Apr 29, 2010
  • Latest release: Aug 10, 2020
  • Number of updates: 36
  • Update frequency: every 104.4 days
  • Top authors: artlung (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /7,789 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.05ms] Passed 4 tests

An overview of server-side resources used by Open Graph Protocol Tools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.97 ▼4.07
Dashboard /wp-admin3.37 ▲0.0647.94 ▼0.25
Posts /wp-admin/edit.php3.42 ▲0.0650.06 ▼2.73
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.79 ▼17.13
Media Library /wp-admin/upload.php3.29 ▲0.0637.72 ▲0.16
Open Graph Protocol /wp-admin/options-general.php?page=opengraphprotocoltools3.2327.90

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Open Graph Protocol Tools
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.18 ▼1.191.91 ▲0.1937.95 ▼5.45
Dashboard /wp-admin2,210 ▲255.77 ▼0.09101.98 ▲1.4637.48 ▼7.75
Posts /wp-admin/edit.php2,093 ▲12.03 ▲0.0234.47 ▼8.0537.92 ▼0.69
Add New Post /wp-admin/post-new.php1,545 ▲2218.22 ▼4.90611.04 ▼91.6857.69 ▼2.75
Media Library /wp-admin/upload.php1,389 ▲14.22 ▲0.03101.02 ▼1.3841.24 ▼6.50
Open Graph Protocol /wp-admin/options-general.php?page=opengraphprotocoltools8152.1522.7823.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=opengraphprotocoltools
    • > Notice in wp-content/plugins/open-graph-protocol-tools/open-graph-protocol-tools.php+69
    Only variables should be passed by reference

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/open-graph-protocol-tools/open-graph-protocol-tools.php:368

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === open-graph-protocol-tools === )
You can look at the official readme.txt

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

The main PHP script in "Open Graph Protocol Tools" version 1.91 is automatically included on every request by WordPress
29 characters long description:
Tools for Open Graph Protocol

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 plugin283 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14940283

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.23
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
default.png3.65KB3.78KB0.00%