78% wp-flashcard-lite

Code Review | WP Flashcard LITE

WordPress plugin WP Flashcard LITE scored78%from 54 tests.

About plugin

  • Plugin page: wp-flashcard-lite
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Nov 2, 2020
  • Latest release: Oct 25, 2023
  • Number of updates: 34
  • Update frequency: every 32.1 days
  • Top authors: wpflashcard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,091 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.92ms] Passed 4 tests

An overview of server-side resources used by WP Flashcard LITE
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0941.17 ▲2.88
Dashboard /wp-admin3.39 ▲0.0444.32 ▼16.64
Posts /wp-admin/edit.php3.45 ▲0.0845.20 ▲1.33
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.21 ▼3.23
Media Library /wp-admin/upload.php3.32 ▲0.0937.24 ▲5.59
Flash Card Settings /wp-admin/edit.php?post_type=flashcard_set&page=wp-flashcard-setting-page3.2930.99
Add New /wp-admin/post-new.php?post_type=flashcard_set3.5246.04
Flash Cards /wp-admin/edit.php?post_type=flashcard_set3.3937.90

Server storage [IO: ▲0.38MB] [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: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

WP Flashcard LITE: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲19013.55 ▼0.8110.55 ▲8.9942.38 ▼0.67
Dashboard /wp-admin2,228 ▲475.58 ▼0.1382.54 ▼14.8037.65 ▼0.78
Posts /wp-admin/edit.php2,133 ▲332.01 ▲0.0233.32 ▼4.3835.03 ▲2.74
Add New Post /wp-admin/post-new.php1,554 ▲2623.01 ▼0.28665.27 ▼31.2463.27 ▼11.01
Media Library /wp-admin/upload.php1,436 ▲364.23 ▲0.02102.86 ▼4.1342.53 ▼3.36
Flash Card Settings /wp-admin/edit.php?post_type=flashcard_set&page=wp-flashcard-setting-page8482.0324.9425.51
Add New /wp-admin/post-new.php?post_type=flashcard_set2,1204.4264.3533.05
Flash Cards /wp-admin/edit.php?post_type=flashcard_set1,7163.7950.2228.65

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-flashcard-lite/includes/shortcodes/views/flashcard-shortcode-html.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-flashcard-lite/includes/shortcodes/flashcard-shortcode.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: flashcard, flash card, flashcards, quizlet

wp-flashcard-lite/wp-flashcard.php 85% from 13 tests

"WP Flashcard LITE" version 1.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-flashcard-lite.php" instead of "wp-flashcard.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 detected3,304 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71782021,573
CSS8302621,380
PHP65680351

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/backend/keyboard.png0.16KB0.14KB▼ 9.94%
assets/images/icons/04.png1.05KB0.22KB▼ 79.18%
assets/images/icons/05.png1.05KB0.23KB▼ 78.50%