68% complete-open-graph

Code Review | Complete Open Graph

WordPress plugin Complete Open Graph scored68%from 54 tests.

About plugin

  • Plugin page: complete-open-graph
  • Plugin version: 3.4.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.0.3
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Jan 31, 2019
  • Number of updates: 54
  • Update frequency: every 15.1 days
  • Top authors: alexmacarthur (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

5,000+ active /48,999 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.52ms] Passed 4 tests

An overview of server-side resources used by Complete Open Graph
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2647.00 ▲2.47
Dashboard /wp-admin3.52 ▲0.2252.66 ▲1.72
Posts /wp-admin/edit.php3.63 ▲0.2855.93 ▲0.54
Add New Post /wp-admin/post-new.php5.66 ▼0.2383.64 ▼14.82
Media Library /wp-admin/upload.php3.44 ▲0.2244.01 ▲4.37
Open Graph /wp-admin/options-general.php?page=complete-open-graph3.4443.60

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Complete Open Graph
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.35 ▼0.051.85 ▼0.1444.21 ▼3.97
Dashboard /wp-admin2,203 ▲235.61 ▼0.0389.36 ▼2.6437.50 ▼2.86
Posts /wp-admin/edit.php2,111 ▲81.99 ▲0.0138.33 ▼4.1935.78 ▼3.09
Add New Post /wp-admin/post-new.php6,375 ▲4,83826.01 ▲7.55935.84 ▲282.5186.95 ▼1.68
Media Library /wp-admin/upload.php1,422 ▲194.33 ▲0.14103.36 ▲5.0244.51 ▲2.12
Open Graph /wp-admin/options-general.php?page=complete-open-graph1,3863.3451.2638.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class '\CompleteOG\App' not found
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/complete-open-graph/src/assets/img/wordpress.svg.php
    • > /wp-content/plugins/complete-open-graph/src/assets/img/github.svg.php
    • > /wp-content/plugins/complete-open-graph/src/assets/img/twitter.svg.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CompleteOpenGraph\\add_action() in wp-content/plugins/complete-open-graph/src/hooks/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CompleteOpenGraph\\add_action() in wp-content/plugins/complete-open-graph/src/hooks/support.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CompleteOpenGraph\\add_action() in wp-content/plugins/complete-open-graph/src/hooks/metabox.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CompleteOpenGraph\\get_option() in wp-content/plugins/complete-open-graph/src/fields.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CompleteOpenGraph\\add_action() in wp-content/plugins/complete-open-graph/src/hooks/generate-open-graph-markup.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CompleteOpenGraph\\add_filter() in wp-content/plugins/complete-open-graph/src/hooks/content-filters.php:10

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: "paypal.me/alexmacarthur"
The official readme.txt is a good inspiration

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

The primary PHP file in "Complete Open Graph" version 3.4.5 is used by WordPress to initiate all plugin functionality
65 characters long description:
Simple, comprehensive, highly customizable Open Graph management.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,327 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP161853521,005
Sass8520263
JavaScript112258
CSS1001

PHP code Passed 2 tests

Analyzing 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.25
Average class complexity7.20
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods1976.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions55
▷ Named functions3665.45%
▷ Anonymous functions1934.55%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin