84% yesno

Code Review | Yes/No Chart

WordPress plugin Yes/No Chart scored84%from 54 tests.

About plugin

  • Plugin page: yesno
  • Plugin version: 1.0.12
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2018
  • Latest release: Jul 13, 2023
  • Number of updates: 35
  • Update frequency: every 57.5 days
  • Top authors: kohseiworks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /15,726 total downloads

Benchmarks

Plugin footprint 82% 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.04MB] [CPU: ▼5.21ms] 75% from 4 tests

Server-side resources used by Yes/No Chart
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 2,928.14ms on /wp-admin/admin.php?page=yesno-set)
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.01 ▼8.71
Dashboard /wp-admin3.34 ▲0.0446.28 ▼2.14
Posts /wp-admin/edit.php3.46 ▲0.1049.91 ▲0.44
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.27 ▼10.44
Media Library /wp-admin/upload.php3.27 ▲0.0435.29 ▲2.79
Question Set /wp-admin/admin.php?page=yesno-set4.402,928.14
Question /wp-admin/admin.php?page=yesno-question3.2430.74

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 29 new files
Database: 2 new tables, 7 new options
New tables
wp_yesno_question
wp_yesno_set
New WordPress options
widget_theysaidso_widget
widget_recent-posts
yesno
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Yes/No Chart
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲20613.88 ▼0.509.08 ▲6.9339.48 ▼4.30
Dashboard /wp-admin2,233 ▲424.86 ▼1.0495.91 ▼3.9438.62 ▼1.00
Posts /wp-admin/edit.php2,116 ▲242.06 ▲0.0739.11 ▼2.7434.15 ▼1.82
Add New Post /wp-admin/post-new.php1,564 ▲2218.23 ▲0.30595.29 ▼17.5059.82 ▲7.83
Media Library /wp-admin/upload.php1,415 ▲274.15 ▼0.0396.53 ▼5.7844.07 ▲0.22
Question Set /wp-admin/admin.php?page=yesno-set9182.0525.5232.50
Question /wp-admin/admin.php?page=yesno-question8232.0524.1026.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 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 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
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yesno/class/class-set.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yesno/class/class-ajax.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yesno/class/class-question.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yesno/class/class-ajax.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
7 plugin tags: answer, yesno, questionnaire, chart, qa...

yesno/yesno.php Passed 13 tests

Analyzing the main PHP file in "Yes/No Chart" version 1.0.12
72 characters long description:
Yes/No Chart plugin. Yes/Noチャートを作れるプラグインです

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
No dangerous file extensions were detected2,637 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP112673822,125
CSS21925236
PO File16781151
JavaScript21430125

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity26.33
▷ Minimum class complexity2.00
▷ Maximum class complexity114.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods71
▷ Static methods5577.46%
▷ Public methods71100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 1.27MB with 0.93MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-8.png72.94KB17.78KB▼ 75.63%
screenshot-5.png173.45KB50.69KB▼ 70.77%
screenshot-3.png150.90KB43.17KB▼ 71.39%
screenshot-9.png75.57KB18.01KB▼ 76.16%
screenshot-7.png97.78KB28.43KB▼ 70.93%