84% sync-ac-with-wp

Code Review | SYNC AC with WP

WordPress plugin SYNC AC with WP scored84%from 54 tests.

About plugin

  • Plugin page: sync-ac-with-wp
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.0
  • WordPress version: 6.3.1
  • First release: Dec 20, 2016
  • Latest release: May 28, 2022
  • Number of updates: 5
  • Update frequency: every 396.4 days
  • Top authors: zhuyi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /865 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.70ms] Passed 4 tests

Analyzing server-side resources used by SYNC AC with WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.94 ▼14.20
Dashboard /wp-admin3.33 ▲0.0345.35 ▼1.34
Posts /wp-admin/edit.php3.38 ▲0.0254.29 ▲4.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0288.69 ▼3.62
Media Library /wp-admin/upload.php3.26 ▲0.0242.92 ▲5.65

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by SYNC AC with WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8114.47 ▼0.181.52 ▼0.3737.53 ▼13.15
Dashboard /wp-admin2,222 ▲314.82 ▼0.10112.72 ▲3.7146.31 ▲3.72
Posts /wp-admin/edit.php2,108 ▲192.05 ▲0.0038.70 ▼0.9535.88 ▼3.15
Add New Post /wp-admin/post-new.php1,546 ▲1323.02 ▼0.23650.20 ▲28.0852.83 ▲3.40
Media Library /wp-admin/upload.php1,407 ▲194.20 ▼0.0294.85 ▼4.7842.35 ▼2.23

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require(vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/sync-ac-with-wp/activecampaign-api-php/examples-composer/index.php on line 3
    • > PHP Fatal error
      require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/sync-ac-with-wp/activecampaign-api-php/examples-composer/index.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: when a new user registered, integrates wordpress with activecampaign by adding new users information to contact on activecampaign

sync-ac-with-wp/wc-ac-sync.php 85% from 13 tests

The principal PHP file in "SYNC AC with WP" v. 1.3.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sync-ac-with-wp.php" instead of "wc-ac-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 plugin1,908 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP264031901,827
Markdown135042
JSON20039

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.48
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods157
▷ Static methods00.00%
▷ Public methods157100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.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
No PNG files were detected