78% irisnet-api

Code Review | Irisnet API Client - AI child protection plugin

WordPress plugin Irisnet API Client - AI child protection plugin scored78%from 54 tests.

About plugin

  • Plugin page: irisnet-api
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 24, 2020
  • Latest release: Dec 1, 2023
  • Number of updates: 24
  • Update frequency: every 49.8 days
  • Top authors: irisnet (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,108 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.68MB] [CPU: ▼0.31ms] Passed 4 tests

Analyzing server-side resources used by Irisnet API Client - AI child protection plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7038.41 ▼3.50
Dashboard /wp-admin4.02 ▲0.7247.61 ▼2.96
Posts /wp-admin/edit.php4.07 ▲0.7149.00 ▲1.26
Add New Post /wp-admin/post-new.php6.56 ▲0.6792.33 ▲4.26
Media Library /wp-admin/upload.php3.88 ▲0.6537.56 ▲3.97
Licenses /wp-admin/admin.php?page=irisnet_licenses3.8533.90
Rules /wp-admin/admin.php?page=irisnet_rules3.8536.03
Dashboard /wp-admin/admin.php?page=irisnet_dash3.9031.41

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 374 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_recent-posts
irisnet_plugin_version
irisnet_plugin_licenses
widget_recent-comments
widget_theysaidso_widget
db_upgraded
irisnet_plugin_rules
theysaidso_admin_options

Browser metrics Passed 4 tests

Irisnet API Client - AI child protection plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9514.83 ▲0.121.72 ▲0.0637.69 ▼7.75
Dashboard /wp-admin2,250 ▲734.86 ▼0.7190.78 ▼11.7338.75 ▼7.93
Posts /wp-admin/edit.php2,155 ▲552.34 ▲0.3841.44 ▲4.1532.44 ▼2.59
Add New Post /wp-admin/post-new.php1,555 ▲2623.41 ▲0.29655.02 ▲64.4254.46 ▼9.04
Media Library /wp-admin/upload.php1,455 ▲524.08 ▼0.0999.17 ▲0.1340.70 ▼1.95
Licenses /wp-admin/admin.php?page=irisnet_licenses8872.0731.4028.98
Rules /wp-admin/admin.php?page=irisnet_rules6,2052.0832.5250.31
Dashboard /wp-admin/admin.php?page=irisnet_dash1,8922.6648.6731.50

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • irisnet_plugin_version
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/irisnet-api/irisnet-api-client.php
  • 140× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/irisnet-api/vendor/guzzlehttp/psr7/tests/LazyOpenStreamTest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Irisnet\\APIV1\\Client\\Model\\ModelInterface' not found in wp-content/plugins/irisnet-api/ext/lib/Model/INObject.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/irisnet-api/vendor/guzzlehttp/psr7/tests/AppendStreamTest.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/irisnet-api/vendor/guzzlehttp/promises/src/Promise.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/irisnet-api/vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/irisnet-api/templates/licenses.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Irisnet\\APIV1\\Client\\Model\\ModelInterface' not found in wp-content/plugins/irisnet-api/ext/lib/Model/INError.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/irisnet-api/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/irisnet-api/vendor/guzzlehttp/psr7/tests/QueryTest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Irisnet\\APIV2\\Client\\Model\\ModelInterface' not found in wp-content/plugins/irisnet-api/ext/lib/Model/Coordinates.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
10 plugin tags: content moderation, porn blocker, artificial intelligence, ai privacy protection, image moderation...

irisnet-api/irisnet-api-client.php 85% from 13 tests

The primary PHP file in "Irisnet API Client - AI child protection plugin" version 2.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 219 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("irisnet-api.php" instead of "irisnet-api-client.php")

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
Success! There were no dangerous files found in this plugin40,518 lines of code in 330 files:
LanguageFilesBlank linesComment linesLines of code
PHP2506,49017,66933,956
Markdown562,05005,426
JSON1100898
XML410133
YAML316070
make211031
SVG2002
CSS1111
JavaScript1011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.03
▷ Minimum class complexity1.00
▷ Maximum class complexity154.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces28
Interfaces27
Traits3
Classes200
▷ Abstract classes10.50%
▷ Concrete classes19999.50%
▷ Final classes3819.10%
Methods2,667
▷ Static methods39814.92%
▷ Public methods2,41490.51%
▷ Protected methods471.76%
▷ Private methods2067.72%
Functions571
▷ Named functions579.98%
▷ Anonymous functions51490.02%
Constants256
▷ Global constants10.39%
▷ Class constants25599.61%
▷ Public constants24495.69%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin