10% nn4

Code Review | NN4

WordPress plugin NN4 scored 10% from 54 tests.

About plugin

  • Plugin page: nn4
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Sep 23, 2014
  • Latest release: Sep 23, 2014
  • Number of updates: 17
  • Update frequency: every 2.8 days
  • Top authors: Keisuke Ishikawa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 720 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/nn4/nn4-estate.php+5
    include_once(estate-site_config.inc): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.65MB] [CPU: ▼50.84ms] Passed 4 tests

Server-side resources used by NN4
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.33 ▼0.127.35 ▼33.90
Dashboard /wp-admin3.35 ▲0.058.51 ▼43.27
Posts /wp-admin/edit.php3.36 ▲0.0010.95 ▼37.33
Add New Post /wp-admin/post-new.php3.35 ▼2.539.31 ▼88.86
Media Library /wp-admin/upload.php3.35 ▲0.138.28 ▼25.28
操作ログダウンロード /wp-admin/admin.php?page=nn4-estate-actionlog3.359.00
AP アカウント設定 /wp-admin/admin.php?page=nn43.357.30
新規追加 /wp-admin/admin.php?page=nn4-estate-add3.359.67
不動産一覧 /wp-admin/admin.php?page=nn4-estate3.369.83
機能選択 /wp-admin/admin.php?page=nn4-select-func3.3612.10
サーバー同期 /wp-admin/admin.php?page=nn4-estate-sync3.369.79
設定 /wp-admin/admin.php?page=nn4-estate-settings3.369.24

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
recovery_mode_email_last_sent
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for NN4
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲12714.80 ▲0.371.86 ▲0.2339.18 ▼10.51
Dashboard /wp-admin2,268 ▲865.86 ▲0.96105.75 ▼3.6757.86 ▲10.85
Posts /wp-admin/edit.php2,151 ▲622.05 ▼0.0139.98 ▲0.8445.99 ▲15.05
Add New Post /wp-admin/post-new.php1,583 ▲6923.30 ▲5.82588.94 ▼42.6244.88 ▲2.28
Media Library /wp-admin/upload.php1,453 ▲654.23 ▼0.0593.33 ▼6.5950.18 ▲6.32
操作ログダウンロード /wp-admin/admin.php?page=nn4-estate-actionlog8092.0525.3045.20
AP アカウント設定 /wp-admin/admin.php?page=nn48602.0728.4558.62
新規追加 /wp-admin/admin.php?page=nn4-estate-add7441.719.9031.35
不動産一覧 /wp-admin/admin.php?page=nn4-estate7361.536.7035.34
機能選択 /wp-admin/admin.php?page=nn4-select-func8092.0324.3234.61
サーバー同期 /wp-admin/admin.php?page=nn4-estate-sync8482.0224.5145.16
設定 /wp-admin/admin.php?page=nn4-estate-settings8712.0624.2868.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/nn4/nn4-estate.php+5
    include_once(estate-site_config.inc): failed to open stream: No such file or directory
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nn4-estate-settings
    • > Warning in wp-content/plugins/nn4/nn4-estate.php+5
    include_once(estate-site_config.inc): failed to open stream: No such file or directory
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nn4-estate-settings
    • > Warning in wp-content/plugins/nn4/nn4-estate.php+5
    include_once(): Failed opening 'estate-site_config.inc' for inclusion (include_path='.:/usr/share/php')
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nn4-estate-settings
    • > Warning in wp-content/plugins/nn4/nn4.php+34
    include_once(site_config.inc): failed to open stream: No such file or directory
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nn4-estate-settings
    • > Warning in wp-content/plugins/nn4/nn4.php+34
    include_once(): Failed opening 'site_config.inc' for inclusion (include_path='.:/usr/share/php')
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nn4-estate-settings
    • > Notice in wp-content/plugins/nn4/nn4-estate-admin-settings.tmpl+4
    Undefined index: settings-updated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nn4-estate
    • > Parse error in wp-content/plugins/nn4/nn4-estate-admin-list.tmpl+324
    syntax error, unexpected end of file
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nn4-estate
    • > Warning in wp-content/plugins/nn4/nn4.php+514
    fopen(wp-content/plugins/nn4/cache/apk): failed to open stream: No such file or directory
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nn4-estate
    • > Warning in wp-content/plugins/nn4/nn4.php+494
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nn4-estate
    • > Warning in wp-content/plugins/nn4/nn4.php+494
    file_get_contents(https://nn4.jp/auth/login): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nn4-estate
    • > Notice in wp-content/plugins/nn4/nn4.php+539
    Undefined index: err_reason
    • > GET request to /wp-admin/admin.php?page=nn4-estate
    • > Warning in wp-content/plugins/nn4/nn4-estate.php+167
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=nn4-estate
    • > Notice in wp-content/plugins/nn4/nn4-estate.php+210
    Undefined variable: flg_all

SRP 0% 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
The following issues need your attention
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/nn4/nn4-estate.php
    • > /wp-content/plugins/nn4/media-uploader.php
    • > /wp-content/plugins/nn4/nn4-event.php
    • > /wp-content/plugins/nn4/nn4.php
    • > /wp-content/plugins/nn4/nn4-location.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: apid in wp-content/plugins/nn4/media-uploader.php on line 89

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=nn4-estate-add
    • > Javascript (severe) in unknown
    /wp-content/plugins/nn4/media-uploader.php?apid&ver=1411449904 0:0 Uncaught SyntaxError: Unexpected token '

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: curation

nn4/nn4.php Passed 13 tests

The main file in "NN4" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
112 characters long description:
NN4 は、NN4 情報エンジンから API 経由で各種情報を取得・管理するプラグインです。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin4,418 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP53204554,242
JavaScript1136176

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.79
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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