62% os-wpc

Code Review | OS-WPカスタマイズプラグイン

WordPress plugin OS-WPカスタマイズプラグイン scored62%from 54 tests.

About plugin

  • Plugin page: os-wpc
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 22, 2016
  • Latest release: Aug 5, 2016
  • Number of updates: 22
  • Update frequency: every 16.0 days
  • Top authors: olivesystem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /824 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼0.63ms] Passed 4 tests

This is a short check of server-side resources used by OS-WPカスタマイズプラグイン
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3342.84 ▼1.09
Dashboard /wp-admin3.66 ▲0.3656.67 ▼1.01
Posts /wp-admin/edit.php3.71 ▲0.3552.15 ▼1.68
Add New Post /wp-admin/post-new.php6.18 ▲0.2998.33 ▲1.26
Media Library /wp-admin/upload.php3.52 ▲0.2942.25 ▲1.77
管理画面の制限 /wp-admin/admin.php?page=os-wpc-admin.php&mode=admin_menu3.4737.41
権限の追加・編集 /wp-admin/admin.php?page=os-wpc-admin.php&mode=role_edit3.4736.10

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 30 new files
Database: 2 new tables, 6 new options
New tables
wp_os_wpc_detail_data
wp_os_wpc_data
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for OS-WPカスタマイズプラグイン
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10314.48 ▲0.221.82 ▼0.0344.20 ▲2.72
Dashboard /wp-admin2,270 ▲675.79 ▼0.11111.38 ▼1.7254.10 ▲9.43
Posts /wp-admin/edit.php2,149 ▲492.04 ▼0.0135.61 ▼4.2943.14 ▲4.13
Add New Post /wp-admin/post-new.php1,584 ▲5023.32 ▲0.27612.45 ▼26.2169.83 ▲14.25
Media Library /wp-admin/upload.php1,443 ▲434.24 ▲0.03103.36 ▼12.1554.52 ▲6.21
はじめに /wp-admin/os-wpc-admin.php260.440.1013.91
プラグインの設定 /wp-admin/os-wpc-option.php260.440.115.55
管理画面の制限 /wp-admin/admin.php?page=os-wpc-admin.php&mode=admin_menu9822.0125.84109.85
ページ表示制限のショートコード /wp-admin/os-wpc-accesslimit.php260.440.096.12
権限の追加・編集 /wp-admin/admin.php?page=os-wpc-admin.php&mode=role_edit9672.0226.4558.36
独自ログインフォーム /wp-admin/os-wpc-customlogin.php260.440.107.53
その他カスタマイズ /wp-admin/os-wpc-etc.php260.440.096.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_os_wpc_detail_data
    • wp_os_wpc_data
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=os-wpc-admin.php&mode=role_edit
    • > Notice in wp-content/plugins/os-wpc/oswpcAdmin.php+114
    Undefined variable: myid

SRP 50% 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
Almost there! Just fix the following items
  • 32× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant OSWPC_PLUGIN_DIR - assumed 'OSWPC_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/os-wpc/oswpcAdmin.php on line 3
    • > PHP Warning
      include_once(): Failed opening 'OSWPC_PLUGIN_DIRclass/etcClass.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/os-wpc/oswpcAdmin.php on line 7
    • > PHP Warning
      include_once(OSWPC_PLUGIN_DIRclass/customLoginClass.php): failed to open stream: No such file or directory in wp-content/plugins/os-wpc/oswpcAdmin.php on line 6
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/os-wpc/os-wp-customized.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'OswpcCommonClass' not found in wp-content/plugins/os-wpc/class/roleClass.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'OswpcCommonClass' not found in wp-content/plugins/os-wpc/class/customLoginClass.php:5
    • > PHP Warning
      include_once(): Failed opening 'OSWPC_PLUGIN_DIRclass/adminOptionsClass.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/os-wpc/oswpcAdmin.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'OswpcCommonClass' not found in wp-content/plugins/os-wpc/class/adminOptionsClass.php:5
    • > PHP Warning
      Use of undefined constant OSWPC_PLUGIN_DIR - assumed 'OSWPC_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/os-wpc/oswpcAdmin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'OswpcCommonClass' not found in wp-content/plugins/os-wpc/class/etcClass.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/os-wpc-admin.php
    • > Network (severe)
    wp-admin/os-wpc-admin.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/os-wpc-option.php
    • > Network (severe)
    wp-admin/os-wpc-option.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/os-wpc-accesslimit.php
    • > Network (severe)
    wp-admin/os-wpc-accesslimit.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/os-wpc-customlogin.php
    • > Network (severe)
    wp-admin/os-wpc-customlogin.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/os-wpc-etc.php
    • > Network (severe)
    wp-admin/os-wpc-etc.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: wpc

os-wpc/os-wp-customized.php 85% from 13 tests

The main file in "OS-WPカスタマイズプラグイン" v. 1.5.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("os-wpc.php" instead of "os-wp-customized.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 171 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,859 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP262655092,574
CSS112284
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity35.50
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity6.37
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods90
▷ Static methods7684.44%
▷ Public methods90100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin