83% question-generator

Code Review | Question Generator

WordPress plugin Question Generator scored83%from 54 tests.

About plugin

  • Plugin page: question-generator
  • Plugin version: 2022111601...
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 9, 2022
  • Latest release: Nov 16, 2022
  • Number of updates: 13
  • Update frequency: every 7.6 days
  • Top authors: questiongenerator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /901 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.20MB] [CPU: ▼2.72ms] Passed 4 tests

A check of server-side resources used by Question Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.23 ▼10.02
Dashboard /wp-admin4.71 ▲1.4178.71 ▲24.15
Posts /wp-admin/edit.php4.84 ▲1.4883.12 ▲30.77
Add New Post /wp-admin/post-new.php3.79 ▼2.0939.29 ▼55.78
Media Library /wp-admin/upload.php4.78 ▲1.5578.02 ▲41.28

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Question Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲12113.72 ▼0.501.56 ▼0.2540.03 ▼8.19
Dashboard /wp-admin2,273 ▲886.87 ▲0.99120.13 ▲2.5682.73 ▲37.21
Posts /wp-admin/edit.php2,164 ▲752.37 ▲0.4056.96 ▲20.0933.57 ▼0.79
Add New Post /wp-admin/post-new.php1,682 ▲16822.43 ▲4.96605.41 ▼110.5545.78 ▼2.55
Media Library /wp-admin/upload.php1,450 ▲625.24 ▲1.09131.23 ▲28.4743.32 ▼2.24

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/media.php' (include_path='.:/usr/share/php') in wp-content/plugins/question-generator/connector/QGAPI.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/question-generator/front/config.php:4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/media.php): failed to open stream: No such file or directory in wp-content/plugins/question-generator/connector/QGAPI.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/question-generator/connector/QGAPI.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: content, content generator, marketing, seo, ai

question-generator/questiongenerator.php 77% from 13 tests

The main file in "Question Generator" v. 2022111601... serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "2022111601...")
  • Main file name: Name the main plugin file the same as the plugin slug ("question-generator.php" instead of "questiongenerator.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 207 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected4,643 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
SVG1004,135
PHP99642480
CSS16028

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods35
▷ Static methods35100.00%
▷ Public methods3188.57%
▷ Protected methods00.00%
▷ Private methods411.43%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/qg-icon.png10.15KB5.99KB▼ 40.98%
images/qg-favi.png4.84KB2.94KB▼ 39.25%