84% flotiq-sync

Code Review | Flotiq Sync

WordPress plugin Flotiq Sync scored 84% from 54 tests.

About plugin

  • Plugin page: flotiq-sync
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.8.1
  • First release: Apr 21, 2021
  • Latest release: May 7, 2021
  • Number of updates: 10
  • Update frequency: every 2.1 days
  • Top authors: flotiq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 124 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.22MB] [CPU: ▼144.52ms] 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.02 ▲0.3045.10 ▲22.36
Dashboard /wp-admin3.31 ▲0.2645.77 ▲0.43
Posts /wp-admin/edit.php3.36 ▲0.2543.02 ▼5.30
Add New Post /wp-admin/post-new.php5.61 ▲0.1784.65 ▼574.93
Media Library /wp-admin/upload.php3.19 ▲0.1935.11 ▲1.73
Flotiq Sync /wp-admin/options-general.php?page=wordpress_2_flotiq_sync_edit3.1633.32

Server storage [IO: ▲2.92MB] [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, 1 new option
New WordPress options
flotiq_api_key

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 /3,709 ▲11315.85 ▲0.219.62 ▲0.5652.70 ▲1.06
Dashboard /wp-admin2,974 ▲375.94 ▼0.25140.46 ▼16.52110.59 ▼13.39
Posts /wp-admin/edit.php2,746 ▲72.72 ▲0.0064.37 ▼19.7985.34 ▼11.39
Add New Post /wp-admin/post-new.php1,688 ▲518.83 ▲0.04408.31 ▲2.03112.72 ▲1.71
Media Library /wp-admin/upload.php1,817 ▲105.02 ▲0.02146.83 ▼3.17116.20 ▼5.01
Flotiq Sync /wp-admin/options-general.php?page=wordpress_2_flotiq_sync_edit1,2272.1155.9777.21

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 1 option in the database
    • flotiq_api_key

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: Interface 'OpenAPI\\Client\\Model\\ModelInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/lib/Model/SystemListProperties.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'OpenAPI\\Client\\Model\\ModelInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/lib/Model/WpAuthorWithoutInternal.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/vendor/guzzlehttp/psr7/src/Stream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'OpenAPI\\Client\\Model\\ModelInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/lib/Model/WpPostWithoutInternal.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'OpenAPI\\Client\\Model\\ModelInterface' not found in wp-content/plugins/flotiq-sync/php-sdk/lib/Model/InlineResponse4009.php:43

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

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

The entry point to "Flotiq Sync" version 1.0.4 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,084 lines of code in 261 files:
LanguageFilesBlank linesComment linesLines of code
PHP2157,58524,73535,606
Markdown232,51706,127
JSON15101,190
YAML418075
SVG10143
CSS11024
Dockerfile18010
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.30MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png162.84KB46.04KB▼ 71.73%
assets/icon-128x128.png4.29KB3.55KB▼ 17.24%
assets/icon-256x256.png9.97KB6.70KB▼ 32.84%
assets/screenshot-3.png86.07KB27.21KB▼ 68.39%
assets/screenshot-1.png44.95KB27.04KB▼ 39.85%