83% post-from-og

Code Review | Post from Open Graph

WordPress plugin Post from Open Graph scored83%from 54 tests.

About plugin

  • Plugin page: post-from-og
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3+
  • WordPress version: 6.3.1
  • First release: May 6, 2013
  • Latest release: May 7, 2013
  • Number of updates: 10
  • Update frequency: every 1.1 days
  • Top authors: brasofilo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.09ms] Passed 4 tests

Analyzing server-side resources used by Post from Open Graph
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.29 ▼2.28
Dashboard /wp-admin3.32 ▲0.0250.92 ▼2.51
Posts /wp-admin/edit.php3.37 ▲0.0248.37 ▲1.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.69 ▲5.86
Media Library /wp-admin/upload.php3.25 ▲0.0233.58 ▼0.84
Post from OG /wp-admin/index.php?page=post-from-og3.2129.55

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post from Open Graph
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9414.43 ▲0.032.10 ▲0.1644.02 ▼2.67
Dashboard /wp-admin2,207 ▲284.84 ▼0.95108.28 ▼6.1841.35 ▼1.72
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0440.41 ▲3.5936.61 ▲2.84
Add New Post /wp-admin/post-new.php1,522 ▼623.19 ▲4.72626.45 ▲0.3456.93 ▲1.42
Media Library /wp-admin/upload.php1,392 ▲44.14 ▼0.0995.21 ▼0.9840.96 ▼1.56
Post from OG /wp-admin/index.php?page=post-from-og9102.1227.2128.58

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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-from-og/post-from-og.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Tested up to: Invalid version format
Please take inspiration from this readme.txt

post-from-og/post-from-og.php 85% from 13 tests

The main PHP file in "Post from Open Graph" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin985 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5147200655
JavaScript13848125
CSS1217117
PO File2242688

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity21.50
▷ Minimum class complexity2.00
▷ Maximum class complexity41.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods1035.71%
▷ Public methods2589.29%
▷ Protected methods00.00%
▷ Private methods310.71%
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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/close_button.png3.68KB1.71KB▼ 53.54%