84% open-graph-images-with-caption

Code Review | Open Graph Images With Caption

WordPress plugin Open Graph Images With Caption scored 84% from 54 tests.

About plugin

  • Plugin page: open-graph-images...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2018
  • Latest release: Apr 21, 2019
  • Number of updates: 10
  • Update frequency: every 15.5 days
  • Top authors: glashkoff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 917 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
Installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼3.25ms] Passed 4 tests

A check of server-side resources used by Open Graph Images With Caption
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2840.03 ▼7.48
Dashboard /wp-admin3.57 ▲0.2752.72 ▲0.09
Posts /wp-admin/edit.php3.68 ▲0.3350.79 ▲4.64
Add New Post /wp-admin/post-new.php6.17 ▲0.2987.68 ▼8.61
Media Library /wp-admin/upload.php3.49 ▲0.2637.78 ▲3.00

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 25 new options
New WordPress options
ogi_og_tw_creator
ogi_def_blur
ogi_og_yoast
ogi_plugin_version
ogi_def_og
ogi_og_tw_site
ogi_def_overlay_color
ogi_title_length
ogi_def_fb_w
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

A check of browser resources used by Open Graph Images With Caption
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲5513.84 ▼0.911.71 ▼0.4042.67 ▼0.12
Dashboard /wp-admin2,232 ▲445.17 ▼0.84106.46 ▼9.3639.30 ▼2.71
Posts /wp-admin/edit.php2,120 ▲312.32 ▲0.2741.29 ▲2.4133.12 ▼0.80
Add New Post /wp-admin/post-new.php6,698 ▲5,17922.18 ▼0.931,068.49 ▲435.4045.34 ▼14.57
Media Library /wp-admin/upload.php1,414 ▲234.48 ▲0.24101.22 ▼1.6345.87 ▲1.51
OG Images With Caption /wp-admin/open-graph-images-with-caption.php260.440.1113.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 25 options in the database
    • ogi_def_box_color
    • ogi_def_tw_h
    • ogi_def_back_color
    • ogi_def_fb_w
    • ogi_og_print_tags
    • ogi_def_tw_w
    • widget_recent-posts
    • ogi_og_tw_creator
    • ogi_def_fb_h
    • can_compress_scripts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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/open-graph-images-with-caption.php
    • > Network (severe)
    wp-admin/open-graph-images-with-caption.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

open-graph-images-with-caption/open-graph-images-with-caption.php Passed 13 tests

The main file in "Open Graph Images With Caption" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
70 characters long description:
Easy generate Open Graph images from the post title and featured image

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,459 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP62532411,456
JavaScript1003

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.33
Average class complexity66.00
▷ Minimum class complexity66.00
▷ Maximum class complexity66.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods625.00%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
3 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/styles.png41.05KB18.35KB▼ 55.30%
images/none.png16.83KB6.92KB▼ 58.87%
images/error.png7.75KB3.38KB▼ 56.38%