78% simple-learn-japanese-quiz

Code Review | Simple Learn Japanese Quiz

WordPress plugin Simple Learn Japanese Quiz scored78%from 54 tests.

About plugin

  • Plugin page: simple-learn-japa...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2023
  • Latest release: Mar 24, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tourhand (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /217 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.90ms] Passed 4 tests

Analyzing server-side resources used by Simple Learn Japanese Quiz
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.83 ▼3.93
Dashboard /wp-admin3.43 ▲0.1350.24 ▲0.05
Posts /wp-admin/edit.php3.54 ▲0.1853.31 ▼2.03
Add New Post /wp-admin/post-new.php6.03 ▲0.1489.52 ▼13.67
Media Library /wp-admin/upload.php3.35 ▲0.1237.58 ▲2.31
Simple Learn Japanese Quiz Settings /wp-admin/options-general.php?page=simplelearnjapanesequiz-settings3.3236.23

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

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

Browser metrics Passed 4 tests

Simple Learn Japanese Quiz: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.97 ▼0.404.99 ▲3.1743.64 ▲1.64
Dashboard /wp-admin2,211 ▲224.83 ▼0.1398.49 ▼10.0038.54 ▼5.90
Posts /wp-admin/edit.php2,097 ▲81.99 ▲0.0232.86 ▼6.2337.09 ▲2.96
Add New Post /wp-admin/post-new.php1,521 ▼1223.21 ▼0.26618.84 ▼52.6557.69 ▲10.44
Media Library /wp-admin/upload.php1,396 ▲54.20 ▲0.0297.14 ▼5.4843.33 ▼5.81
Simple Learn Japanese Quiz Settings /wp-admin/options-general.php?page=simplelearnjapanesequiz-settings8602.1925.1331.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-learn-japanese-quiz/public/partials/tourhand-jap-quiz-public-display.php
    • > /wp-content/plugins/simple-learn-japanese-quiz/admin/partials/tourhand-jap-quiz-admin-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-learn-japanese-quiz/public/class-tourhand-jap-quiz-public.php:185
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/simple-learn-japanese-quiz/admin/class-tourhand-jap-quiz-admin.php:324

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: hotel, travel, tour, language, japanese

simple-learn-japanese-quiz/tourhand-jap-quiz.php 85% from 13 tests

This is the main PHP file of "Simple Learn Japanese Quiz" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-learn-japanese-quiz.php" instead of "tourhand-jap-quiz.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin656 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12221518611
CSS25839
JavaScript24546

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity4.12
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin