84% trivia-adapter-pack

Code Review | Trivia Adapter Pack

WordPress plugin Trivia Adapter Pack scored84%from 54 tests.

About plugin

  • Plugin page: trivia-adapter-pack
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2022
  • Latest release: Apr 19, 2022
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: markobakac (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /190 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼14.48ms] Passed 4 tests

An overview of server-side resources used by Trivia Adapter Pack
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0633.77 ▼6.13
Dashboard /wp-admin3.36 ▲0.0244.32 ▼21.18
Posts /wp-admin/edit.php3.48 ▲0.1251.25 ▲2.40
Add New Post /wp-admin/post-new.php5.95 ▲0.0676.89 ▼30.47
Media Library /wp-admin/upload.php3.29 ▲0.0535.13 ▼0.15

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Trivia Adapter Pack
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼0.953.88 ▲2.3138.06 ▼0.54
Dashboard /wp-admin2,206 ▲154.87 ▼0.25109.25 ▲6.8641.75 ▲2.68
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0242.09 ▲7.5634.59 ▼0.50
Add New Post /wp-admin/post-new.php1,514 ▼2217.64 ▼5.36672.87 ▲73.6359.05 ▲8.02
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0393.29 ▼5.4240.26 ▼0.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Convo\\Core\\Factory\\AbstractPackageDefinition' not found in wp-content/plugins/trivia-adapter-pack/src/ConvoTriviaPack/Pckg/TriviaAdapterPack/TriviaAdapterPackageDefinition.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ConvoTriviaPack\\Pckg\\TriviaAdapterPack\\AbstractQuestionsAdapterElement' not found in wp-content/plugins/trivia-adapter-pack/src/ConvoTriviaPack/Pckg/TriviaAdapterPack/QuizCatAdapterElement.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trivia-adapter-pack/trivia-adapter-pack.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'ConvoTriviaPack\\Pckg\\TriviaAdapterPack\\AbstractQuestionsAdapterElement' not found in wp-content/plugins/trivia-adapter-pack/src/ConvoTriviaPack/Pckg/TriviaAdapterPack/LifterLMSAdapterElement.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Convo\\Core\\Workflow\\AbstractWorkflowContainerComponent' not found in wp-content/plugins/trivia-adapter-pack/src/ConvoTriviaPack/Pckg/TriviaAdapterPack/AbstractQuestionsAdapterElement.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ConvoTriviaPack\\Pckg\\TriviaAdapterPack\\AbstractQuestionsAdapterElement' not found in wp-content/plugins/trivia-adapter-pack/src/ConvoTriviaPack/Pckg/TriviaAdapterPack/QuizMakerAdapterElement.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

trivia-adapter-pack/trivia-adapter-pack.php Passed 13 tests

"Trivia Adapter Pack" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
133 characters long description:
This plugin adds a package for Convoworks and allows us to make a voice trivia quiz game for a QuizCat, Quiz Maker or LifterLMS quiz.

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
No dangerous file extensions were detected894 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP15207391776
HTML33087
JSON30031

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity12.89
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods51
▷ Static methods1835.29%
▷ Public methods4486.27%
▷ Protected methods59.80%
▷ Private methods23.92%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin