87% easy-flashcards

Code Review | Easy Flashcards

WordPress plugin Easy Flashcards scored 87% from 54 tests.

About plugin

  • Plugin page: easy-flashcards
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.0
  • WordPress version: 5.8.1
  • First release: Oct 14, 2014
  • Latest release: Oct 14, 2014
  • Number of updates: 13
  • Update frequency: every 0.1 days
  • Top authors: sagesony (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 2,666 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼137.78ms] Passed 4 tests

Server-side resources used by Easy Flashcards
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0752.10 ▲16.89
Dashboard /wp-admin3.13 ▲0.0794.61 ▲46.66
Posts /wp-admin/edit.php3.18 ▲0.0755.49 ▲15.32
Add New Post /wp-admin/post-new.php5.49 ▲0.0591.41 ▼579.86
Media Library /wp-admin/upload.php3.07 ▲0.0736.40 ▼3.47
flashcards /wp-admin/options-general.php?page=ef_flash3.0230.84
Manage Flashcards /wp-admin/admin.php?page=ef_flash3.0232.51
Flashcard Settings /wp-admin/admin.php?page=ef_settings_submenu3.0230.06

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: 3 new tables, no new options
New tables
wp_ef_cards
wp_ef_index
wp_ef_card_design

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Flashcards
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,859 ▲27716.70 ▲0.6917.32 ▲7.8052.97 ▲1.54
Dashboard /wp-admin3,009 ▲756.12 ▼0.02170.90 ▲14.50132.51 ▲5.07
Posts /wp-admin/edit.php2,781 ▲422.73 ▲0.0373.03 ▲6.1494.95 ▼2.70
Add New Post /wp-admin/post-new.php1,646 ▲5521.05 ▲2.45280.81 ▼124.31113.07 ▲0.62
Media Library /wp-admin/upload.php1,852 ▲1075.11 ▲0.07149.35 ▼16.77136.63 ▲3.32
flashcards /wp-admin/options-general.php?page=ef_flash1,0982.4157.3367.08
Manage Flashcards /wp-admin/admin.php?page=ef_flash1,0982.3659.4570.82
Flashcard Settings /wp-admin/admin.php?page=ef_settings_submenu1,2512.4062.8270.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ef_flash
    • > Notice in wp-content/plugins/easy-flashcards/ef_plugin_options.php+12
    Undefined index: delete
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ef_flash
    • > Notice in wp-content/plugins/easy-flashcards/ef_plugin_options.php+13
    Undefined index: edit
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ef_flash
    • > Notice in wp-content/plugins/easy-flashcards/ef_plugin_options.php+61
    Undefined index: bravo
    • > GET request to /wp-admin/admin.php?page=ef_settings_submenu
    • > Notice in wp-content/plugins/easy-flashcards/ef_card_design.php+70
    Undefined index: fi

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-flashcards/ef_plugin_options.php:219
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/easy-flashcards/ef_install.php:187
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-flashcards/ef_enqueues.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #3, #4 in easy-flashcards/assets to your readme.txt
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

easy-flashcards/ef_install.php 85% from 13 tests

The main file in "Easy Flashcards" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 165 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-flashcards.php" instead of "ef_install.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin464 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP410526398
CSS115052
JavaScript28314

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.19MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png50.16KB21.65KB▼ 56.83%
screenshot-3.png59.02KB24.50KB▼ 58.49%
screenshot-2.png51.26KB21.19KB▼ 58.66%
screenshot-4.png33.72KB12.47KB▼ 63.01%