89% graph-commons

Code Review | Graph Commons

WordPress plugin Graph Commons scored89%from 54 tests.

About plugin

  • Plugin page: graph-commons
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.7
  • WordPress version: 6.3.1
  • First release: Jan 27, 2016
  • Latest release: Aug 4, 2016
  • Number of updates: 12
  • Update frequency: every 26.6 days
  • Top authors: binfil (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,091 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.58ms] Passed 4 tests

Analyzing server-side resources used by Graph Commons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0744.79 ▲2.20
Dashboard /wp-admin3.38 ▲0.0350.95 ▼14.04
Posts /wp-admin/edit.php3.49 ▲0.1447.50 ▼5.93
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.58 ▼16.54
Media Library /wp-admin/upload.php3.30 ▲0.0741.03 ▲3.10
Graph Commons /wp-admin/options-general.php?page=graphcommons3.2736.78

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Graph Commons: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲2614.46 ▲0.111.94 ▼0.1743.83 ▲1.18
Dashboard /wp-admin2,215 ▲415.63 ▼0.0483.94 ▼16.0043.41 ▼4.47
Posts /wp-admin/edit.php2,124 ▲272.02 ▲0.0234.72 ▼3.3434.09 ▼4.73
Add New Post /wp-admin/post-new.php1,557 ▲3118.24 ▼4.71611.95 ▼92.9381.27 ▲29.08
Media Library /wp-admin/upload.php1,423 ▲204.18 ▼0.0596.50 ▼17.1346.11 ▼2.64
Graph Commons /wp-admin/options-general.php?page=graphcommons8282.0425.7230.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: graph, data vizualisation, big data, publishing, networks...

graph-commons/graphcommons.php 85% from 13 tests

The main PHP script in "Graph Commons" version 1.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("graph-commons.php" instead of "graphcommons.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected777 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript28012272
PHP17341236
CSS2311173
PO File1141760
Markdown122036

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/gc_nodecard.png2.53KB1.70KB▼ 33.02%
images/gc_graph-icon-64x64.png1.85KB0.92KB▼ 50.34%