72% quizpedia

Code Review | QuizPedia

WordPress plugin QuizPedia scored72%from 54 tests.

About plugin

  • Plugin page: quizpedia
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2015
  • Latest release: Apr 10, 2015
  • Number of updates: 4
  • Update frequency: every 19.7 days
  • Top authors: quizpedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /663 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.02MB] [CPU: ▼4.98ms] Passed 4 tests

A check of server-side resources used by QuizPedia
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.97 ▼4.13
Dashboard /wp-admin3.33 ▲0.0243.74 ▼4.62
Posts /wp-admin/edit.php3.38 ▲0.0246.07 ▼0.58
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.22 ▼9.87
Media Library /wp-admin/upload.php3.25 ▲0.0232.40 ▼1.28
QuizPedia Settings /wp-admin/options-general.php?page=plugin3.1928.92

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for QuizPedia
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.12 ▼1.261.80 ▼0.3344.88 ▲2.92
Dashboard /wp-admin2,213 ▲255.88 ▲0.7796.77 ▼14.2540.84 ▼4.45
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0439.46 ▲3.0034.93 ▲2.40
Add New Post /wp-admin/post-new.php1,551 ▲3018.32 ▼4.99609.91 ▼71.0859.17 ▲7.75
Media Library /wp-admin/upload.php1,395 ▲134.19 ▲0.0193.89 ▼11.4742.62 ▼3.48
QuizPedia Settings /wp-admin/options-general.php?page=plugin8162.1825.4634.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=plugin
    • > Notice in wp-content/plugins/quizpedia/quizpedia.php+82
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/quizpedia/quizpedia.php:54

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=plugin
    • > Network (severe)
    var/www/wordpress/wp-content/plugins/quizpedia/logo.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Find the id of the quiz you want to embed and put the shortcode '[qp id="QUIZID" w="WIDTH" h="HEIGHT"]' in your post), #2 (The resulting embed on the page)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === quizpedia === )
The official readme.txt might help

quizpedia/quizpedia.php Passed 13 tests

The primary PHP file in "QuizPedia" version 1.0.2 is used by WordPress to initiate all plugin functionality
35 characters long description:
Embed a QuizPedia quiz on your site

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
Everything looks great! No dangerous files found in this plugin55 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1103255

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.21MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png153.69KB40.51KB▼ 73.64%
screenshot-1.png57.47KB17.79KB▼ 69.04%
logo.png5.42KB2.69KB▼ 50.32%