10% nw-company-profile

Code Review | NW Company Profile

WordPress plugin NW Company Profile scored10%from 54 tests.

About plugin

  • Plugin page: nw-company-profile
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.13-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2020
  • Latest release: Jun 20, 2023
  • Number of updates: 9
  • Update frequency: every 117.4 days
  • Top authors: nakweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /469 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/nw-company-profile/nw-company-profile.php+403
    Non-static method NW_Company_Profile::activation_common() should not be called statically

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.28ms] Passed 4 tests

An overview of server-side resources used by NW Company Profile
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1137.47 ▼14.05
Dashboard /wp-admin3.43 ▲0.1243.99 ▼1.96
Posts /wp-admin/edit.php3.55 ▲0.1846.90 ▲0.85
Add New Post /wp-admin/post-new.php6.01 ▲0.1282.67 ▼8.93
Media Library /wp-admin/upload.php3.35 ▲0.1234.20 ▼0.19
基本情報 /wp-admin/admin.php?page=nw_pf_settings3.3633.34
共通設定 /wp-admin/admin.php?page=nw_main_menu3.3231.61

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
nw_company_profile_options
widget_theysaidso_widget
widget_recent-posts
nw_company_profile_options_group
nw_common_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for NW Company Profile
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.25 ▼0.101.74 ▼0.2241.55 ▲0.86
Dashboard /wp-admin2,219 ▲455.55 ▲0.0280.64 ▼10.6945.90 ▲7.02
Posts /wp-admin/edit.php2,127 ▲272.00 ▲0.0032.59 ▼7.0339.60 ▲2.71
Add New Post /wp-admin/post-new.php1,548 ▲2023.59 ▲0.32591.54 ▼49.6354.02 ▼0.59
Media Library /wp-admin/upload.php1,418 ▲184.16 ▼0.0693.89 ▼2.6544.01 ▲3.88
基本情報 /wp-admin/admin.php?page=nw_pf_settings1,4682.6648.7796.52
共通設定 /wp-admin/admin.php?page=nw_main_menu8122.0324.4537.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/nw-company-profile/nw-company-profile.php+414
    Non-static method NW_Company_Profile::uninstall_common() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: company, nw, profile, nakweb, basic...

nw-company-profile/nw-company-profile.php Passed 13 tests

"NW Company Profile" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
102 characters long description:
ウェブサイト内で汎用的に利用する基本情報を管理できるプラグインです。

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 plugin1,797 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP4137263835
Sass1380361
CSS23371326
JavaScript43496275

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity40.00
▷ Minimum class complexity7.00
▷ Maximum class complexity69.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods32
▷ Static methods1134.38%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.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
There are no PNG files in this plugin