83% simple-point-quiz-for-woocommerce

Code Review | Simple Point Quiz For Woocommerce

WordPress plugin Simple Point Quiz For Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: simple-point-quiz...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 13, 2020
  • Latest release: Mar 13, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: elixirlouise (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /461 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼1.67ms] Passed 4 tests

An overview of server-side resources used by Simple Point Quiz For Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.92 ▲4.54
Dashboard /wp-admin3.31 ▲0.0045.85 ▲0.87
Posts /wp-admin/edit.php3.36 ▲0.0042.27 ▼2.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.95 ▼6.04
Media Library /wp-admin/upload.php3.23 ▲0.0034.80 ▲0.76

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Point Quiz For Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.63 ▼0.664.23 ▲2.1143.17 ▼8.78
Dashboard /wp-admin2,206 ▲214.88 ▼1.00113.66 ▲9.4642.12 ▼0.67
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0735.66 ▲1.6031.28 ▼2.13
Add New Post /wp-admin/post-new.php1,542 ▼018.22 ▼4.92634.71 ▼36.0249.66 ▼6.73
Media Library /wp-admin/upload.php1,382 ▼34.19 ▼0.0694.36 ▼12.4142.89 ▼4.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/simple-point-quiz-for-woocommerce/admin/partials/simple-point-quiz-for-woocommerce-admin-quiz-edit.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/simple-point-quiz-for-woocommerce/admin/partials/simple-point-quiz-for-woocommerce-admin-question-sort-answer.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/simple-point-quiz-for-woocommerce/admin/partials/simple-point-quiz-for-woocommerce-admin-quiz-linking.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/simple-point-quiz-for-woocommerce/admin/partials/simple-point-quiz-for-woocommerce-admin-quiz-add.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/simple-point-quiz-for-woocommerce/admin/partials/simple-point-quiz-for-woocommerce-admin-question-answers.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: You can take inspiration from this readme.txt

simple-point-quiz-for-woocommerce/simple-point-quiz-for-woocommerce.php 92% from 13 tests

The main PHP file in "Simple Point Quiz For Woocommerce" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "3.0.0")

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
Good job! No executable or dangerous file extensions detected1,373 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP15191671801
CSS35611297
JavaScript43781172
PO File197165103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity17.86
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods50
▷ Static methods24.00%
▷ Public methods4590.00%
▷ Protected methods00.00%
▷ Private methods510.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png31.37KB12.18KB▼ 61.16%
images/icon-sm.png51.66KB1.34KB▼ 97.41%