10% nw-description-for-custom-post-types

Code Review | NW Description For Custom Post Types

WordPress plugin NW Description For Custom Post Types scored10%from 54 tests.

About plugin

  • Plugin page: nw-description-fo...
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.13-5.8.3
  • WordPress version: 6.3.1
  • First release: May 26, 2020
  • Latest release: Jun 14, 2023
  • Number of updates: 42
  • Update frequency: every 26.5 days
  • Top authors: nakweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,718 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/nw-description-for-custom-post-types/nw-description-for-custom-post-types.php+571
    Non-static method NW_Description_For_Custom_Post_Types::activation_common() should not be called statically

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.64ms] Passed 4 tests

An overview of server-side resources used by NW Description For Custom Post Types
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.90 ▼5.98
Dashboard /wp-admin3.33 ▼0.0251.53 ▼17.54
Posts /wp-admin/edit.php3.38 ▲0.0251.31 ▲1.46
Add New Post /wp-admin/post-new.php5.91 ▲0.0298.88 ▼6.49
Media Library /wp-admin/upload.php3.25 ▲0.0239.10 ▼0.56
ディスクリプション設定 /wp-admin/admin.php?page=nw_dfcpt_settings3.2236.36
共通設定 /wp-admin/admin.php?page=nw_main_menu3.2235.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
nw_common_options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

NW Description For Custom Post Types: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.26 ▼0.151.67 ▼0.3338.54 ▼5.25
Dashboard /wp-admin2,225 ▲515.65 ▼0.0284.59 ▼15.2143.23 ▼4.91
Posts /wp-admin/edit.php2,124 ▲242.00 ▼0.0540.75 ▲4.1543.60 ▲4.03
Add New Post /wp-admin/post-new.php1,567 ▲2223.26 ▲0.03650.68 ▼38.3948.82 ▼7.30
Media Library /wp-admin/upload.php1,427 ▲274.21 ▲0.0095.25 ▼17.0448.14 ▼0.40
ディスクリプション設定 /wp-admin/admin.php?page=nw_dfcpt_settings8982.1525.3780.80
共通設定 /wp-admin/admin.php?page=nw_main_menu8122.0333.3846.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/nw-description-for-custom-post-types/nw-description-for-custom-post-types.php+579
    Non-static method NW_Description_For_Custom_Post_Types::uninstall_common() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
5 plugin tags: nakweb, custom post type, meta, description, nw

nw-description-for-custom-post-types/nw-description-for-custom-post-types.php Passed 13 tests

The main PHP file in "NW Description For Custom Post Types" ver. 1.3.7 adds more information about the plugin and also serves as the entry point for this plugin
138 characters long description:
カスタム投稿タイプのアーカイブページおよびシングルページのディスクリプションを設定できます。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin762 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP290153568
CSS2181116
JavaScript262478

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity45.50
▷ Minimum class complexity7.00
▷ Maximum class complexity84.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.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