78% synchronizing-civicrm-data-to-custom-posts

Code Review | Synchronizing CiviCRM data to Custom Posts

WordPress plugin Synchronizing CiviCRM data to Custom Posts scored78%from 54 tests.

About plugin

  • Plugin page: synchronizing-civ...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8
  • WordPress version: 6.3.1
  • First release: Sep 7, 2021
  • Latest release: Feb 12, 2022
  • Number of updates: 11
  • Update frequency: every 14.7 days
  • Top authors: jaapjansma (81.82%)kainuk (27.27%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /547 total downloads

Benchmarks

Plugin footprint 83% 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.09MB] [CPU: ▼1.33ms] Passed 4 tests

An overview of server-side resources used by Synchronizing CiviCRM data to Custom Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.87 ▲2.01
Dashboard /wp-admin3.44 ▲0.1465.33 ▲6.62
Posts /wp-admin/edit.php3.49 ▲0.1461.06 ▲2.47
Add New Post /wp-admin/post-new.php5.97 ▲0.08101.25 ▼14.71
Media Library /wp-admin/upload.php3.39 ▲0.1743.23 ▲4.91
All Custom Posts /wp-admin/edit.php?post_type=sync_civi_profile3.4347.22
Add New /wp-admin/post-new.php?post_type=sync_civi_profile3.4348.51

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Synchronizing CiviCRM data to Custom Posts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲8614.22 ▼0.131.75 ▼0.0544.99 ▲3.19
Dashboard /wp-admin2,252 ▲785.65 ▲0.0386.37 ▼2.7985.78 ▲42.71
Posts /wp-admin/edit.php2,159 ▲622.10 ▲0.0541.23 ▲0.1532.83 ▼1.90
Add New Post /wp-admin/post-new.php1,552 ▼322.89 ▲4.75616.84 ▼12.2557.07 ▼6.98
Media Library /wp-admin/upload.php1,461 ▲614.28 ▲0.0599.53 ▼2.9643.67 ▼5.01
All Custom Posts /wp-admin/edit.php?post_type=sync_civi_profile1,0942.0435.4027.03
Add New /wp-admin/post-new.php?post_type=sync_civi_profile1,3142.5249.7537.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/synchronizing-civicrm-data-to-custom-posts/includes/class-local-civicrm.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/synchronizing-civicrm-data-to-custom-posts/admin/admin.php:288
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/synchronizing-civicrm-data-to-custom-posts/synchronizing-civicrm-data-to-custom-posts.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: rest, custom fields, acf, api, connector...

synchronizing-civicrm-data-to-custom-posts/synchronizing-civicrm-data-to-custom-posts.php 92% from 13 tests

This is the main PHP file of "Synchronizing CiviCRM data to Custom Posts" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 208 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin487 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP476171474
SVG10013

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity23.33
▷ Minimum class complexity11.00
▷ Maximum class complexity38.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods521.74%
▷ Public methods2086.96%
▷ Protected methods14.35%
▷ Private methods28.70%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin