84% open-graphite

Code Review | Open Graphite

WordPress plugin Open Graphite scored84%from 54 tests.

About plugin

  • Plugin page: open-graphite
  • Plugin version: 1.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2019
  • Latest release: Jun 8, 2023
  • Number of updates: 54
  • Update frequency: every 27.6 days
  • Top authors: mikeyott (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

5,000+ active /88,119 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.88ms] Passed 4 tests

An overview of server-side resources used by Open Graphite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1345.97 ▲4.08
Dashboard /wp-admin3.44 ▲0.0956.45 ▼13.04
Posts /wp-admin/edit.php3.56 ▲0.2053.72 ▲6.49
Add New Post /wp-admin/post-new.php6.00 ▲0.1186.40 ▼9.03
Media Library /wp-admin/upload.php3.34 ▲0.1142.83 ▲6.58
Open Graphite /wp-admin/admin.php?page=open-graphite-settings3.6339.51
Help /wp-admin/admin.php?page=open-graphite-help3.3539.00

Server storage [IO: ▲0.64MB] [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: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Open Graphite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,000 ▲26514.24 ▼0.121.93 ▲0.2843.62 ▲1.28
Dashboard /wp-admin2,369 ▲1956.13 ▲0.60110.14 ▲21.3892.50 ▲46.59
Posts /wp-admin/edit.php2,305 ▲2083.41 ▲1.4648.49 ▲10.9266.33 ▲28.49
Add New Post /wp-admin/post-new.php1,713 ▲18522.03 ▼1.00639.75 ▼77.2333.78 ▼28.03
Media Library /wp-admin/upload.php1,430 ▲334.14 ▼0.0788.54 ▼17.1782.05 ▲33.84
Open Graphite /wp-admin/admin.php?page=open-graphite-settings2,1663.1740.75111.83
Help /wp-admin/admin.php?page=open-graphite-help1,0962.9838.8467.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% 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 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/open-graphite/_open_graphite.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/open-graphite/inc/preview-links.php:1

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: twitter, facebook, thumbnail, social, open graph

open-graphite/_open_graphite.php 92% from 13 tests

The primary PHP file in "Open Graphite" version 1.7.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("open-graphite.php" instead of "_open_graphite.php")

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
Success! There were no dangerous files found in this plugin2,434 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP7354641,380
PO File22922981,036
SVG170017
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity71.00
▷ Minimum class complexity71.00
▷ Maximum class complexity71.00
Average method complexity7.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.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
2 PNG files occupy 0.39MB with 0.26MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/help/facebook-debugger.png259.75KB74.38KB▼ 71.36%
images/help/metabox.png140.92KB53.20KB▼ 62.25%