79% post-connector

Code Review | Post Connector

WordPress plugin Post Connector scored 79% from 54 tests.

About plugin

  • Plugin page: post-connector
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 15, 2014
  • Latest release: Sep 21, 2023
  • Number of updates: 29
  • Update frequency: every 115.7 days
  • Top authors: barrykooij (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active / 7,998 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼11.58ms] Passed 4 tests

A check of server-side resources used by Post Connector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1148.74 ▼19.27
Dashboard /wp-admin3.47 ▲0.1744.37 ▼23.22
Posts /wp-admin/edit.php3.53 ▲0.1747.94 ▼1.11
Add New Post /wp-admin/post-new.php6.01 ▲0.1289.84 ▼2.70
Media Library /wp-admin/upload.php3.34 ▲0.1135.06 ▲2.98
Post Connector /wp-admin/admin.php?page=post_connector3.3642.00
LinkPostScreen /wp-admin/admin.php?page=link_post_screen3.2832.54
Add New /wp-admin/admin.php?page=post_connector_edit3.3430.10
Upgrade to Pro /wp-admin/admin.php?page=post_connector_go_pro2.158.86

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 88 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_sp_widget_showchilds
recovery_mode_email_last_sent
can_compress_scripts
widget_recent-posts
pc_version
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Post Connector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8614.78 ▲0.762.02 ▼0.0147.86 ▲5.14
Dashboard /wp-admin2,238 ▲535.87 ▼0.03115.77 ▼2.8442.99 ▼4.40
Posts /wp-admin/edit.php2,124 ▲322.01 ▲0.0144.79 ▼0.1339.17 ▲7.65
Add New Post /wp-admin/post-new.php1,644 ▲11123.42 ▲0.24715.52 ▲25.8039.81 ▼23.90
Media Library /wp-admin/upload.php1,420 ▲294.17 ▼0.04139.36 ▼24.8761.93 ▼8.55
Post Connector /wp-admin/admin.php?page=post_connector1,0782.2033.0346.99
LinkPostScreen /wp-admin/admin.php?page=link_post_screen7471.538.3021.54
Add New /wp-admin/admin.php?page=post_connector_edit1,1391.6933.4241.12
Upgrade to Pro /wp-admin/admin.php?page=post_connector_go_pro9084.10112.82115.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • widget_sp_widget_showchilds
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • pc_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=link_post_screen
    • > Notice in wp-content/plugins/post-connector/core/classes/hooks/class-hook-link-post-screen.php+167
    Undefined index: sp_pt_link
    • > GET request to /wp-admin/admin.php?page=link_post_screen
    • > Notice in wp-content/plugins/post-connector/core/classes/hooks/class-hook-link-post-screen.php+170
    Undefined index: sp_parent
    • > GET request to /wp-admin/admin.php?page=link_post_screen
    • > Notice in wp-content/plugins/post-connector/core/classes/hooks/class-hook-link-post-screen.php+173
    Undefined offset: 2
    • > GET request to /wp-admin/admin.php?page=link_post_screen
    • > Error in wp-content/plugins/post-connector/core/classes/hooks/class-hook-link-post-screen.php+176
    Uncaught Error: Call to a member function get_child() on null in wp-content/plugins/post-connector/core/classes/hooks/class-hook-link-post-screen.php:176
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): SP_Hook_Link_Post_Screen->link_post_screen_content()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'SP_Constants_Core' not found in wp-content/plugins/post-connector/core/classes/class-constants.php:3
    • > PHP Fatal error
      Uncaught Error: Class '_WP_Editors' not found in wp-content/plugins/post-connector/core/assets/js/tinymce/editor_plugin_lang.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SP_Hook' not found in wp-content/plugins/post-connector/core/classes/hooks/class-hook-post-type.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-connector/post-connector.php:49
    • > PHP Fatal error
      Uncaught Error: Class 'SP_Hook' not found in wp-content/plugins/post-connector/core/classes/co-hooks/class-co-hook-sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SP_Hook' not found in wp-content/plugins/post-connector/core/classes/co-hooks/class-co-hook-menu.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: post connector, post connection, connection, widget, related...

post-connector/post-connector.php Passed 13 tests

The main file in "Post Connector" v. 1.0.11 serves as a complement to information provided in readme.txt and as the entry point to the plugin
60 characters long description:
With Post Connector you can easily link posts to each other.

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
No dangerous file extensions were detected6,193 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
PO File101,4201,8113,490
PHP518291,0942,281
JavaScript96037300
CSS2316122

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.69
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes714.29%
▷ Concrete classes4285.71%
▷ Final classes00.00%
Methods147
▷ Static methods149.52%
▷ Public methods13189.12%
▷ Protected methods10.68%
▷ Private methods1510.20%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants15.56%
▷ Class constants1794.44%
▷ Public constants17100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/js/tinymce/icon_shortcode_pc.png0.24KB0.29KB0.00%
core/assets/images/icon-pc.png1.50KB0.63KB▼ 57.74%
core/assets/images/grabber.png0.95KB0.13KB▼ 86.45%