10% izanai

Code Review | izanai

WordPress plugin izanai scored10%from 54 tests.

About plugin

  • Plugin page: izanai
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.2-4.6.1
  • WordPress version: 6.3.1
  • First release: Jun 9, 2016
  • Latest release: Dec 6, 2016
  • Number of updates: 16
  • Update frequency: every 11.3 days
  • Top authors: dev0abcnavi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /616 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Error in wp-content/plugins/izanai/src/class/izanai_SNS_connect_control.class.php+15
    Uncaught ArgumentCountError: Too few arguments to function izanai_SNS_connect_control::__construct(), 0 passed in wp-content/plugins/izanai/src/class/izanai_SNS_connect_view.class.php on line 20 and exactly 1 expected in wp-content/plugins/izanai/src/class/izanai_SNS_connect_control.class.php:15
    Stack trace:
    #0 wp-content/plugins/izanai/src/class/izanai_SNS_connect_view.class.php(20): izanai_SNS_connect_control->__construct()
    #1 wp-content/plugins/izanai/izanai.php(51): izanai_SNS_connect_view->__construct()
    #2 wp-content/plugins/izanai/izanai.php(56): izanai_main->__construct()
    #3 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #4 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.78ms] Passed 4 tests

This is a short check of server-side resources used by izanai
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.20 ▼3.29
Dashboard /wp-admin3.31 ▲0.0056.36 ▲0.06
Posts /wp-admin/edit.php3.36 ▲0.0049.82 ▼0.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.32 ▼19.64
Media Library /wp-admin/upload.php3.23 ▲0.0037.11 ▼3.42

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by izanai
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.111.76 ▲0.1442.62 ▲2.04
Dashboard /wp-admin2,195 ▲155.54 ▲0.0185.54 ▼6.3437.48 ▼4.58
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0534.88 ▼10.5432.86 ▼2.94
Add New Post /wp-admin/post-new.php1,535 ▲918.09 ▼5.04644.52 ▼2.3774.72 ▼3.21
Media Library /wp-admin/upload.php1,403 ▲34.25 ▲0.0795.45 ▼22.9045.04 ▼3.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/user.php): failed to open stream: No such file or directory in wp-content/plugins/izanai/izanai.php on line 20
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/izanai/izanai.php on line 20
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/user.php' (include_path='.:/usr/share/php') in wp-content/plugins/izanai/izanai.php on line 20

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 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

izanai/izanai.php 92% from 13 tests

"izanai" version 1.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Almost there! Just fix the following issues
  • Do not distribute dangerous files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/izanai/src/vender/facebook/fb_ca_chain_bundle.crt
4,241 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP177751,1184,011
PO File1102124230

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity31.78
▷ Minimum class complexity1.00
▷ Maximum class complexity162.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes15.56%
▷ Concrete classes1794.44%
▷ Final classes00.00%
Methods427
▷ Static methods51.17%
▷ Public methods37988.76%
▷ Protected methods429.84%
▷ Private methods61.41%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin