84% open-graph-metabox

Code Review | Open Graph Metabox

WordPress plugin Open Graph Metabox scored 84% from 54 tests.

About plugin

  • Plugin page: open-graph-metabox
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Oct 19, 2012
  • Latest release: Jun 22, 2017
  • Number of updates: 29
  • Update frequency: every 58.9 days
  • Top authors: nielsvanrenselaar (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active / 24,870 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.59MB] [CPU: ▼15.09ms] Passed 4 tests

Analyzing server-side resources used by Open Graph Metabox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.77 ▼4.47
Dashboard /wp-admin3.41 ▲0.1151.12 ▲4.15
Posts /wp-admin/edit.php3.53 ▲0.1850.12 ▼0.06
Add New Post /wp-admin/post-new.php3.22 ▼2.6636.81 ▼55.86
Media Library /wp-admin/upload.php3.32 ▲0.0932.17 ▲0.05
Open Graph settings /wp-admin/options-general.php?page=open-graph-metabox3.3235.86

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Open Graph Metabox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,980 ▲22314.72 ▲0.141.91 ▼0.4042.45 ▼4.28
Dashboard /wp-admin2,351 ▲1666.46 ▲0.57118.15 ▼4.9340.83 ▼2.90
Posts /wp-admin/edit.php2,263 ▲1743.41 ▲1.3666.38 ▲28.1538.05 ▲5.71
Add New Post /wp-admin/post-new.php6,718 ▲5,17620.11 ▲1.93889.31 ▲236.4045.59 ▼18.13
Media Library /wp-admin/upload.php1,393 ▲24.25 ▲0.0791.13 ▼9.3646.21 ▼2.06
Open Graph settings /wp-admin/options-general.php?page=open-graph-metabox1,5293.0237.6628.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=open-graph-metabox
    • > Network (severe)
    wp-content/plugins/open-graph-metabox/css/admin.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

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
3 plugin tags: open graph, meta, facebook

open-graph-metabox/open-graph-metabox.php Passed 13 tests

"Open Graph Metabox" version 1.4.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
85 characters long description:
This plugin lets you set the Open Graph meta tags per post, page or custom post type.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected407 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP215135379
JavaScript19325
Markdown1103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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
PNG images were not found in this plugin