84% embedquiz

Code Review | EmbedQuiz

WordPress plugin EmbedQuiz scored84%from 54 tests.

About plugin

  • Plugin page: embedquiz
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: May 10, 2023
  • Latest release: May 29, 2023
  • Number of updates: 4
  • Update frequency: every 4.8 days
  • Top authors: embedquiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /254 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.55ms] Passed 4 tests

An overview of server-side resources used by EmbedQuiz
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.64 ▼1.08
Dashboard /wp-admin3.38 ▲0.0756.20 ▼0.35
Posts /wp-admin/edit.php3.49 ▲0.1350.26 ▼2.55
Add New Post /wp-admin/post-new.php5.96 ▲0.0888.53 ▼6.20
Media Library /wp-admin/upload.php3.30 ▲0.0739.76 ▲1.61

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_embedquiz_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

EmbedQuiz: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7514.42 ▲0.041.79 ▼0.0343.00 ▼2.79
Dashboard /wp-admin2,227 ▲424.88 ▼0.02113.01 ▼27.6543.96 ▼7.19
Posts /wp-admin/edit.php2,107 ▲182.04 ▲0.0436.75 ▼4.2236.74 ▲3.56
Add New Post /wp-admin/post-new.php6,369 ▲4,83627.86 ▲4.52984.69 ▲285.8839.95 ▼18.35
Media Library /wp-admin/upload.php1,409 ▲214.07 ▼0.16102.50 ▼8.8046.96 ▲3.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_embedquiz_widget
    • widget_recent-posts
    • db_upgraded

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 everything seems fine, this is not 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 items
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'EMBEDQUIZ__PLUGIN_DIR/views/EmbedQuizAdminPage.php' (include_path='.:/usr/share/php') in wp-content/plugins/embedquiz/classes/EmbedQuizWordpressAdmin.php on line 2
    • > PHP Warning
      Use of undefined constant EMBEDQUIZ__PLUGIN_DIR - assumed 'EMBEDQUIZ__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/embedquiz/classes/EmbedQuizWidget.php on line 3
    • > PHP Warning
      Use of undefined constant EMBEDQUIZ__PLUGIN_DIR - assumed 'EMBEDQUIZ__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/embedquiz/views/EmbedQuizAdminPage.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'EMBEDQUIZ__PLUGIN_DIR/classes/EmbedQuizAPI.php' (include_path='.:/usr/share/php') in wp-content/plugins/embedquiz/classes/EmbedQuizWidget.php on line 3
    • > PHP Warning
      require_once(EMBEDQUIZ__PLUGIN_DIR/classes/EmbedQuizAPI.php): failed to open stream: No such file or directory in wp-content/plugins/embedquiz/classes/EmbedQuizWidget.php on line 3
    • > PHP Warning
      require_once(EMBEDQUIZ__PLUGIN_DIR/classes/EmbedQuizAPI.php): failed to open stream: No such file or directory in wp-content/plugins/embedquiz/views/EmbedQuizAdminPage.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'EMBEDQUIZ__PLUGIN_DIR/classes/EmbedQuizAPI.php' (include_path='.:/usr/share/php') in wp-content/plugins/embedquiz/views/EmbedQuizAdminPage.php on line 2
    • > PHP Warning
      require_once(EMBEDQUIZ__PLUGIN_DIR/views/EmbedQuizAdminPage.php): failed to open stream: No such file or directory in wp-content/plugins/embedquiz/classes/EmbedQuizWordpressAdmin.php on line 2
    • > PHP Warning
      Use of undefined constant EMBEDQUIZ__PLUGIN_DIR - assumed 'EMBEDQUIZ__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/embedquiz/classes/EmbedQuizWordpressAdmin.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

embedquiz/embedquiz.php Passed 13 tests

"EmbedQuiz" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
135 characters long description:
This plugin connects WordPress to EmbedQuiz.com. Use Gutenberg Blocks, Shortcodes, and Legacy Widgets to embed quizzes on your website!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected17,016 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JSON40016,291
PHP74233363
CSS325174
JavaScript42268173
Sass20015

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.00
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods16
▷ Static methods1275.00%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin