68% wp-sync-for-notion

Code Review | WP Sync for Notion - Notion to WordPress

WordPress plugin WP Sync for Notion - Notion to WordPress scored68%from 54 tests.

About plugin

  • Plugin page: wp-sync-for-notion
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2023
  • Latest release: Nov 22, 2023
  • Number of updates: 14
  • Update frequency: every 18.6 days
  • Top authors: wpconnectco (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /5,542 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.44MB] [CPU: ▲3.76ms] Passed 4 tests

Analyzing server-side resources used by WP Sync for Notion - Notion to WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4248.06 ▲6.61
Dashboard /wp-admin3.76 ▲0.4254.49 ▼8.67
Posts /wp-admin/edit.php3.81 ▲0.4654.87 ▲7.07
Add New Post /wp-admin/post-new.php6.37 ▲0.49105.38 ▲10.04
Media Library /wp-admin/upload.php3.69 ▲0.4642.83 ▲11.84
Add New /wp-admin/post-new.php?post_type=nwpsync-connection3.8249.74
All Connections /wp-admin/edit.php?post_type=nwpsync-connection3.7342.70
Scheduled Actions /wp-admin/tools.php?page=action-scheduler3.8650.56

Server storage [IO: ▲1.62MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 239 new files
Database: 4 new tables, 10 new options
New tables
wp_actionscheduler_groups
wp_actionscheduler_claims
wp_actionscheduler_actions
wp_actionscheduler_logs
New WordPress options
action_scheduler_hybrid_store_demarkation
widget_recent-comments
db_upgraded
action_scheduler_lock_async-request-runner
theysaidso_admin_options
widget_theysaidso_widget
schema-ActionScheduler_LoggerSchema
widget_recent-posts
schema-ActionScheduler_StoreSchema
can_compress_scripts

Browser metrics Passed 4 tests

WP Sync for Notion - Notion to WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8514.39 ▼0.351.64 ▼0.1438.52 ▼8.32
Dashboard /wp-admin2,228 ▲485.67 ▲0.0098.76 ▲5.7948.11 ▲4.41
Posts /wp-admin/edit.php2,145 ▲452.11 ▲0.0941.39 ▲0.5935.73 ▲2.56
Add New Post /wp-admin/post-new.php1,556 ▲3023.42 ▲0.10665.57 ▲1.7049.75 ▲0.23
Media Library /wp-admin/upload.php1,446 ▲494.17 ▼0.0896.26 ▼8.9241.36 ▼1.93
Add New /wp-admin/post-new.php?post_type=nwpsync-connection3,5734.74119.9382.70
All Connections /wp-admin/edit.php?post_type=nwpsync-connection1,2071.9132.1135.09
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2911.8229.4531.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables detected upon uninstall: 4 tables
    • wp_actionscheduler_actions
    • wp_actionscheduler_groups
    • wp_actionscheduler_logs
    • wp_actionscheduler_claims
  • This plugin does not fully uninstall, leaving 10 options in the database
    • action_scheduler_hybrid_store_demarkation
    • action_scheduler_lock_async-request-runner
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • schema-ActionScheduler_StoreSchema
    • widget_recent-comments
    • theysaidso_admin_options
    • schema-ActionScheduler_LoggerSchema
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=nwpsync-connection
    • > Notice in wp-content/plugins/wp-sync-for-notion/views/metabox-notion-settings.php+97
    Undefined index: database
    • > GET request to /wp-admin/post-new.php?post_type=nwpsync-connection
    • > Warning in wp-content/plugins/wp-sync-for-notion/views/metabox-notion-settings.php+97
    Invalid argument supplied for foreach()

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
Please fix the following
  • 70× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Notion_Wp_Sync\otion_WP_Sync_Abstract_Settings' not found in wp-content/plugins/wp-sync-for-notion/includes/class-notion-wp-sync-options.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/wp-sync-for-notion/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MonthField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Notion_Wp_Sync\otion_WP_Sync_Abstract_Destination' not found in wp-content/plugins/wp-sync-for-notion/includes/destinations/class-notion-wp-sync-post-destination.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_SimpleSchedule' not found in wp-content/plugins/wp-sync-for-notion/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Logger' not found in wp-content/plugins/wp-sync-for-notion/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Notion_Wp_Sync\otion_WP_Sync_Abstract_Model' not found in wp-content/plugins/wp-sync-for-notion/includes/notion-models/class-notion-wp-sync-page-model.php:13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-sync-for-notion/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-sync-for-notion/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/wp-sync-for-notion/vendor/woocommerce/action-scheduler/classes/WP_CLI/Migration_Command.php:22
    • > PHP Warning
      Use of undefined constant NOTION_WP_SYNC_PLUGIN_DIR - assumed 'NOTION_WP_SYNC_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-sync-for-notion/includes/admin/class-notion-wp-sync-admin.php on line 10

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 on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: automation, wordpress, integration, notion, nocode...

wp-sync-for-notion/notion-wp-sync.php 92% from 13 tests

The principal PHP file in "WP Sync for Notion - Notion to WordPress" v. 1.3.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-sync-for-notion.php" instead of "notion-wp-sync.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin12,601 lines of code in 229 files:
LanguageFilesBlank linesComment linesLines of code
PHP1582,6038,39611,402
CSS21149617
JavaScript6512671505
JSON10049
SVG30028

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.45
▷ Minimum class complexity1.00
▷ Maximum class complexity96.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces6
Interfaces11
Traits2
Classes128
▷ Abstract classes2015.62%
▷ Concrete classes10884.38%
▷ Final classes00.00%
Methods915
▷ Static methods11512.57%
▷ Public methods68975.30%
▷ Protected methods19821.64%
▷ Private methods283.06%
Functions72
▷ Named functions2129.17%
▷ Anonymous functions5170.83%
Constants39
▷ Global constants615.38%
▷ Class constants3384.62%
▷ Public constants33100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-wpconnect.png1.53KB1.53KB0.06%