68% os-diagnosis-generator

Code Review | 診断ジェネレータ作成プラグイン

WordPress plugin 診断ジェネレータ作成プラグイン scored68%from 54 tests.

About plugin

  • Plugin page: os-diagnosis-gene...
  • Plugin version: 1.4.10
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.9.3
  • WordPress version: 6.3.1
  • First release: Aug 8, 2014
  • Latest release: May 15, 2022
  • Number of updates: 51
  • Update frequency: every 55.7 days
  • Top authors: olivesystem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /13,038 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▼2.02ms] Passed 4 tests

An overview of server-side resources used by 診断ジェネレータ作成プラグイン
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5043.55 ▲1.92
Dashboard /wp-admin3.82 ▲0.5249.36 ▼3.39
Posts /wp-admin/edit.php3.87 ▲0.5155.61 ▲5.61
Add New Post /wp-admin/post-new.php6.34 ▲0.4598.69 ▼12.21
Media Library /wp-admin/upload.php3.68 ▲0.4542.81 ▲9.30

Server storage [IO: ▲1.38MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 56 new files
Database: 4 new tables, 9 new options
New tables
wp_os_diagnosis_generator_detail_data
wp_os_diagnosis_generator_data
wp_os_diagnosis_generator_form_options
wp_os_diagnosis_generator_question_data
New WordPress options
widget_theysaidso_widget
os_diagnosis_generator_PluginTableVersion
can_compress_scripts
os_diagnosis_generator_PluginVersion
widget_recent-comments
theysaidso_admin_options
os_diagnosis_generator_Plugin
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for 診断ジェネレータ作成プラグイン
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲11513.88 ▼0.861.65 ▼0.0644.84 ▲2.40
Dashboard /wp-admin2,254 ▲725.82 ▼0.04115.40 ▲1.9850.74 ▲10.00
Posts /wp-admin/edit.php2,149 ▲602.60 ▲0.6144.95 ▲4.3447.37 ▲12.09
Add New Post /wp-admin/post-new.php1,555 ▲2723.72 ▲0.57604.60 ▲8.7629.11 ▼29.23
Media Library /wp-admin/upload.php1,442 ▲575.08 ▲0.86106.36 ▲7.0851.44 ▲7.96
/wp-admin/diagnosis-generator-delete.php260.440.1313.56
テーマ編集 /wp-admin/diagnosis-generator-theme.php260.440.075.94
診断フォーム一覧 /wp-admin/diagnosis-generator-list.php260.440.116.92
新規作成 /wp-admin/diagnosis-generator-new.php260.440.096.57
/wp-admin/diagnosis-generator-write.php260.440.066.58
診断ジェネレータ作成プラグイン /wp-admin/diagnosis-generator-admin.php260.440.126.12
/wp-admin/diagnosis-generator-agreement.php260.440.105.11
オプション /wp-admin/diagnosis-generator-options.php260.440.105.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie tables detected upon uninstall: 4 tables
    • wp_os_diagnosis_generator_question_data
    • wp_os_diagnosis_generator_form_options
    • wp_os_diagnosis_generator_data
    • wp_os_diagnosis_generator_detail_data
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • os_diagnosis_generator_Plugin
    • db_upgraded
    • widget_recent-comments
    • os_diagnosis_generator_PluginVersion
    • os_diagnosis_generator_PluginTableVersion
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/os-diagnosis-generator/os-diagnosis-generator.php:33
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/os-diagnosis-generator/os-diagnosis-generator.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'DiagnosisClass' not found in wp-content/plugins/os-diagnosis-generator/diagnosisAdminClass.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'DiagnosisClass' not found in wp-content/plugins/os-diagnosis-generator/class/themeClass.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DiagnosisClass' not found in wp-content/plugins/os-diagnosis-generator/class/sqlClass.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DiagnosisClass' not found in wp-content/plugins/os-diagnosis-generator/diagnosisViewClass.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'DiagnosisClass' not found in wp-content/plugins/os-diagnosis-generator/class/validationClass.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/diagnosis-generator-delete.php
    • > Network (severe)
    wp-admin/diagnosis-generator-delete.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/diagnosis-generator-theme.php
    • > Network (severe)
    wp-admin/diagnosis-generator-theme.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/diagnosis-generator-list.php
    • > Network (severe)
    wp-admin/diagnosis-generator-list.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/diagnosis-generator-new.php
    • > Network (severe)
    wp-admin/diagnosis-generator-new.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/diagnosis-generator-write.php
    • > Network (severe)
    wp-admin/diagnosis-generator-write.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/diagnosis-generator-admin.php
    • > Network (severe)
    wp-admin/diagnosis-generator-admin.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/diagnosis-generator-agreement.php
    • > Network (severe)
    wp-admin/diagnosis-generator-agreement.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/diagnosis-generator-options.php
    • > Network (severe)
    wp-admin/diagnosis-generator-options.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
1 plugin tags: plugin

os-diagnosis-generator/os-diagnosis-generator.php Passed 13 tests

The primary PHP file in "診断ジェネレータ作成プラグイン" version 1.4.10 is used by WordPress to initiate all plugin functionality
114 characters long description:
WordPressで診断ジェネレータ(診断サイト、占いサイト)を作成できるプラグインです

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin27,309 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript63,9413,23019,374
PHP234827014,812
CSS10701402,709
HTML18415414

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity37.65
▷ Minimum class complexity1.00
▷ Maximum class complexity180.00
Average method complexity6.24
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods119
▷ Static methods11193.28%
▷ Public methods11899.16%
▷ Protected methods00.00%
▷ Private methods10.84%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.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
15 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
js/jquery-ui/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
js/jquery-ui/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
img/radio-button.png1.49KB0.51KB▼ 66.01%
img/radio-button-checked.png1.64KB0.63KB▼ 61.41%