68% notionify

Code Review | Notionify - WordPress, WooCommerce, Contact form 7 integration with notion.

WordPress plugin Notionify - WordPress, WooCommerce, Contact form 7 integration with notion. scored 68% from 54 tests.

About plugin

  • Plugin page: notionify
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2023
  • Latest release: Mar 2, 2023
  • Number of updates: 23
  • Update frequency: every 0.3 days
  • Top authors: javmah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 146 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: ▲5.20MB] [CPU: ▲26.25ms] 75% from 4 tests

A check of server-side resources used by Notionify - WordPress, WooCommerce, Contact form 7 integration with notion.
Please have a look at the following items
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.20MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.96 ▲5.5060.33 ▲14.93
Dashboard /wp-admin8.98 ▲5.6871.09 ▲25.22
Posts /wp-admin/edit.php8.98 ▲5.6385.36 ▲39.06
Add New Post /wp-admin/post-new.php9.88 ▲3.99111.91 ▲27.84
Media Library /wp-admin/upload.php8.98 ▲5.7671.04 ▲37.00
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius8.9871.62

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 210 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
fs_active_plugins
fs_gdpr
db_upgraded
fs_debug_mode
theysaidso_admin_options
widget_theysaidso_widget
fs_accounts

Browser metrics Passed 4 tests

Checking browser requirements for Notionify - WordPress, WooCommerce, Contact form 7 integration with notion.
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲20613.51 ▼1.0810.33 ▲8.5627.81 ▼11.45
Dashboard /wp-admin2,236 ▲515.81 ▼0.0195.86 ▼3.8638.91 ▼3.98
Posts /wp-admin/edit.php2,125 ▲362.02 ▲0.0340.97 ▲3.8338.68 ▼2.19
Add New Post /wp-admin/post-new.php1,533 ▼023.11 ▼0.19654.21 ▲5.0464.07 ▲10.80
Media Library /wp-admin/upload.php1,421 ▲394.21 ▲0.13103.24 ▲0.7346.39 ▼0.26
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0921.7327.1231.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/notionify/includes/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_theysaidso_widget
    • fs_accounts
    • theysaidso_admin_options
    • widget_recent-posts
    • fs_gdpr
    • can_compress_scripts
    • fs_debug_mode
    • fs_active_plugins
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/notionify/public/partials/notionify-public-display.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/notionify/admin/partials/notionify-admin-display.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/notionify/admin/partials/notionify-add-edit.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/notionify/admin/partials/notionify-admin-api-key.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/notionify/admin/partials/notionify-admin-log.php:16

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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: notion, woocommerce, automation, contact-form-7

notionify/notionify.php Passed 13 tests

The main file in "Notionify - WordPress, WooCommerce, Contact form 7 integration with notion." v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
32 characters long description:
Notion + WordPress + WooCommerce

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin36,547 lines of code in 151 files:
LanguageFilesBlank linesComment linesLines of code
PHP1308,36918,41336,320
JavaScript638113214
CSS150813

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity96.13
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods1,325
▷ Static methods19414.64%
▷ Public methods93870.79%
▷ Protected methods171.28%
▷ Private methods37027.92%
Functions96
▷ Named functions96100.00%
▷ Anonymous functions00.00%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 0.84MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/icon_4.png13.38KB9.78KB▼ 26.91%
admin/css/screenshot-1.png114.53KB42.42KB▼ 62.96%
admin/css/screenshot-4.png143.31KB53.36KB▼ 62.77%
admin/css/icon_5.png11.14KB5.85KB▼ 47.52%
includes/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%