77% the-connectome

Code Review | The Connectome

WordPress plugin The Connectome scored77%from 54 tests.

About plugin

  • Plugin page: the-connectome
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 11, 2019
  • Latest release: Jul 11, 2019
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: armandorivero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /564 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.40MB] [CPU: ▼5.65ms] Passed 4 tests

Analyzing server-side resources used by The Connectome
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2844.12 ▲1.79
Dashboard /wp-admin3.60 ▲0.3061.52 ▲5.35
Posts /wp-admin/edit.php3.65 ▲0.2962.04 ▲11.15
Add New Post /wp-admin/post-new.php3.44 ▼2.4551.40 ▼40.88
Media Library /wp-admin/upload.php3.54 ▲0.3155.76 ▲23.28
The Connectome /wp-admin/options-general.php?page=connectome-options3.5146.89

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
connectome-options-options-storage
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for The Connectome
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.10 ▼0.634.15 ▲2.0741.96 ▼5.97
Dashboard /wp-admin2,216 ▲366.09 ▲0.4687.17 ▼5.2639.99 ▲2.16
Posts /wp-admin/edit.php2,121 ▲212.52 ▲0.5241.14 ▲0.2135.73 ▼0.17
Add New Post /wp-admin/post-new.php1,534 ▼123.41 ▼1.10659.62 ▲25.5270.00 ▲3.36
Media Library /wp-admin/upload.php1,415 ▲184.76 ▲0.59100.11 ▼1.2444.62 ▼1.03
The Connectome /wp-admin/options-general.php?page=connectome-options1,0062.3531.0929.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Connectome\\add_action() in wp-content/plugins/the-connectome/interfaces/rest_api-hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Connectome\\add_action() in wp-content/plugins/the-connectome/interfaces/rest_api-hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Connectome\\add_shortcode() in wp-content/plugins/the-connectome/shortcodes/graph-container.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Connectome\\add_action() in wp-content/plugins/the-connectome/data/data-hooks.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Connectome\\add_action() in wp-content/plugins/the-connectome/data/data-hooks.php:51
    • > PHP Fatal error
      Uncaught Error: Class 'Connectome\\OptionStorage' not found in wp-content/plugins/the-connectome/interfaces/admin/options-page.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Connectome\\add_action() in wp-content/plugins/the-connectome/enqueue/enqueue.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=connectome-options
    • > Javascript (severe) in unknown
    /wp-content/plugins/the-connectome/enqueue/js/vue_connectome_build.js 10:112070 Uncaught TypeError: Cannot read properties of null (reading 'nodes')

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: "none"
Please take inspiration from this readme.txt

the-connectome/connectome.php 69% from 13 tests

This is the main PHP file of "The Connectome" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 216 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("the-connectome.php" instead of "connectome.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,094 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP221826841,087
JavaScript1057

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity8.00
▷ Minimum class complexity2.00
▷ Maximum class complexity18.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods74
▷ Static methods1013.51%
▷ Public methods6790.54%
▷ Protected methods00.00%
▷ Private methods79.46%
Functions25
▷ Named functions1456.00%
▷ Anonymous functions1144.00%
Constants1
▷ Global constants1100.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 were not PNG files found in your plugin