84% flotiq-sync

Code Review | Flotiq Sync

WordPress plugin Flotiq Sync scored84%from 54 tests.

About plugin

  • Plugin page: flotiq-sync
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 21, 2021
  • Latest release: Jan 14, 2022
  • Number of updates: 11
  • Update frequency: every 24.8 days
  • Top authors: flotiq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /468 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼7.84ms] Passed 4 tests

A check of server-side resources used by Flotiq Sync
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2342.31 ▲1.32
Dashboard /wp-admin3.56 ▲0.2146.68 ▼12.61
Posts /wp-admin/edit.php3.61 ▲0.2545.21 ▼0.60
Add New Post /wp-admin/post-new.php6.08 ▲0.1981.86 ▼16.00
Media Library /wp-admin/upload.php3.42 ▲0.1934.15 ▼2.16
Flotiq Sync /wp-admin/options-general.php?page=wordpress_2_flotiq_sync_edit3.3932.40

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Flotiq Sync
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.40 ▼0.131.71 ▼0.0338.58 ▼2.34
Dashboard /wp-admin2,204 ▲235.58 ▼0.1480.37 ▼22.7738.57 ▼2.17
Posts /wp-admin/edit.php2,106 ▲62.02 ▲0.0138.78 ▲4.0434.79 ▼0.80
Add New Post /wp-admin/post-new.php1,531 ▲323.20 ▲0.12580.28 ▼71.5055.59 ▲1.22
Media Library /wp-admin/upload.php1,409 ▲94.22 ▲0.1098.19 ▼14.4345.83 ▼3.15
Flotiq Sync /wp-admin/options-general.php?page=wordpress_2_flotiq_sync_edit9072.1324.8932.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • flotiq_api_key
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 116× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/flotiq-sync/src/admin/wordpress-2-flotiq-sync-admin.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'OpenAPI\\Client\\Model\\ModelInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/lib/Model/WpPageList.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/guzzlehttp/psr7/src/PumpStream.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'OpenAPI\\Client\\Model\\ModelInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/lib/Model/MediaListAllOf.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/guzzlehttp/psr7/src/Request.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/guzzlehttp/psr7/src/DroppingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/guzzlehttp/psr7/src/ServerRequest.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'OpenAPI\\Client\\Model\\ModelInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/lib/Model/InlineResponse4006.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/guzzlehttp/promises/src/TaskQueue.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/guzzlehttp/promises/src/Promise.php: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)
There were no browser issues found

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
5 plugin tags: backup, flotiq, wordpress, headless cms, synchronization

flotiq-sync/flotiq-sync.php Passed 13 tests

The entry point to "Flotiq Sync" version 1.0.5 is a PHP file that has certain tags in its header comment area
104 characters long description:
Use this WordPress plugin to easily connect your WordPress instance to Flotiq and synchronize your data.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected43,050 lines of code in 261 files:
LanguageFilesBlank linesComment linesLines of code
PHP2157,58524,73535,606
Markdown232,51706,127
JSON15101,190
YAML418075
CSS11024
Dockerfile18010
SVG1009
make1409

PHP code Passed 2 tests

An overview of 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.39
Average class complexity22.27
▷ Minimum class complexity1.00
▷ Maximum class complexity287.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces16
Interfaces16
Traits2
Classes174
▷ Abstract classes00.00%
▷ Concrete classes174100.00%
▷ Final classes1810.34%
Methods2,794
▷ Static methods51718.50%
▷ Public methods2,59892.98%
▷ Protected methods722.58%
▷ Private methods1244.44%
Functions339
▷ Named functions6820.06%
▷ Anonymous functions27179.94%
Constants150
▷ Global constants00.00%
▷ Class constants150100.00%
▷ Public constants150100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.29MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png82.91KB26.55KB▼ 67.98%
assets/screenshot-1.png67.67KB26.29KB▼ 61.15%
assets/screenshot-2.png137.54KB39.93KB▼ 70.97%
assets/icon-256x256.png8.82KB3.89KB▼ 55.88%
assets/icon-128x128.png3.56KB1.94KB▼ 45.46%