94% catenis-api-client

Code Review | Catenis API Client for WordPress

WordPress plugin Catenis API Client for WordPress scored 94% from 54 tests.

About plugin

  • Plugin page: catenis-api-client
  • Plugin version: 3.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.9.2
  • First release: Jan 3, 2019
  • Latest release: Sep 3, 2021
  • Number of updates: 27
  • Update frequency: every 36.2 days
  • Top authors: catenisadmin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 602 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Catenis API Client for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0355.41 ▲2.26
Dashboard /wp-admin3.46 ▲0.0533.26 ▲0.31
Posts /wp-admin/edit.php3.68 ▲0.0440.49 ▼6.35
Add New Post /wp-admin/post-new.php6.92 ▼0.0592.21 ▼1,183.96
Media Library /wp-admin/upload.php3.34 ▲0.0424.84 ▲2.73
Catenis API Client /wp-admin/options-general.php?page=ctn_api_client_opts3.3028.53

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 644 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Catenis API Client for WordPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4615.84 ▲0.315.75 ▲0.112.85 ▲0.08
Dashboard /wp-admin2,894 ▲406.12 ▲0.00117.99 ▼11.71157.32 ▼0.42
Posts /wp-admin/edit.php2,696 ▲113.23 ▼0.0063.78 ▼2.12144.49 ▲3.75
Add New Post /wp-admin/post-new.php1,654 ▼718.08 ▲1.00418.93 ▼2.18160.18 ▲7.72
Media Library /wp-admin/upload.php1,703 ▲55.55 ▲0.03136.25 ▼5.05182.32 ▼5.24
Catenis API Client /wp-admin/options-general.php?page=ctn_api_client_opts1,1152.4452.28136.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 338× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/catenis-api-client/thirdparty/ringcentral/psr7/tests/AppendStreamTest.php:7
    • > PHP Warning
      require(wp-content/plugins/catenis-api-client/thirdparty/evenement/evenement/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/catenis-api-client/thirdparty/evenement/evenement/examples/benchmark-remove-listener-once.php on line 18
    • > PHP Fatal error
      Uncaught Error: Interface 'Catenis\\WP\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/catenis-api-client/thirdparty/guzzlehttp/psr7/src/LimitStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Catenis\\WP\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/catenis-api-client/thirdparty/ringcentral/psr7/src/BufferStream.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Catenis\\WP\\React\\Socket\\ConnectorInterface' not found in wp-content/plugins/catenis-api-client/thirdparty/react/socket/src/SecureConnector.php:11
    • > PHP Warning
      require(wp-content/plugins/catenis-api-client/thirdparty/clue/buzz-react/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/catenis-api-client/thirdparty/clue/buzz-react/examples/11-http-proxy.php on line 9
    • > PHP Warning
      require(wp-content/plugins/catenis-api-client/thirdparty/clue/buzz-react/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/catenis-api-client/thirdparty/clue/buzz-react/examples/02-concurrent.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'TestCase' not found in wp-content/plugins/catenis-api-client/thirdparty/clue/block-react/tests/FunctionSleepTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/catenis-api-client/thirdparty/ratchet/rfc6455/tests/unit/Messaging/MessageTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'TestCase' not found in wp-content/plugins/catenis-api-client/thirdparty/clue/buzz-react/tests/BrowserTest.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: blockchain of things, blockchain, catenis api, catenis

catenis-api-client/catenis-api-client.php Passed 13 tests

Analyzing the main PHP file in "Catenis API Client for WordPress" version 3.0.0
64 characters long description:
Provides a way to use the Catenis services from within WordPress

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
Good job! No executable or dangerous file extensions detected64,458 lines of code in 575 files:
LanguageFilesBlank linesComment linesLines of code
PHP4379,96616,80745,605
Markdown605,097014,727
JSON35002,789
JavaScript410588484
YAML167232477
XML15160296
make317041
Bourne Shell39024
Dockerfile28015

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.38
▷ Minimum class complexity1.00
▷ Maximum class complexity185.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces69
Interfaces35
Traits4
Classes311
▷ Abstract classes51.61%
▷ Concrete classes30698.39%
▷ Final classes6420.92%
Methods3,058
▷ Static methods2558.34%
▷ Public methods2,69087.97%
▷ Protected methods822.68%
▷ Private methods2869.35%
Functions1,225
▷ Named functions16813.71%
▷ Anonymous functions1,05786.29%
Constants193
▷ Global constants4824.87%
▷ Class constants14575.13%
▷ Public constants145100.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
No PNG images were found in this plugin