84% oracle-cards

Code Review | Oracle Cards Lite

WordPress plugin Oracle Cards Lite scored84%from 54 tests.

About plugin

  • Plugin page: oracle-cards
  • Plugin version: 1.1.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Apr 24, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 48
  • Update frequency: every 17.5 days
  • Top authors: giuse (83.33%)emotionalonlinestorytelling (18.75%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,861 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.18MB] [CPU: ▼2.36ms] Passed 4 tests

This is a short check of server-side resources used by Oracle Cards Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.09 ▼3.33
Dashboard /wp-admin3.51 ▲0.2147.91 ▲3.20
Posts /wp-admin/edit.php3.63 ▲0.2755.06 ▲7.59
Add New Post /wp-admin/post-new.php6.10 ▲0.2183.76 ▼15.50
Media Library /wp-admin/upload.php3.43 ▲0.2140.16 ▲6.20
Status /wp-admin/admin.php?page=oracle-cards-status3.5033.94
Oracle Cards /wp-admin/edit-tags.php?taxonomy=decks&post_type=card3.4538.32

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Oracle Cards Lite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲10013.24 ▼1.341.67 ▲0.0142.51 ▲1.34
Dashboard /wp-admin2,247 ▲624.85 ▼0.17113.03 ▲2.8637.88 ▼3.78
Posts /wp-admin/edit.php2,133 ▲622.04 ▲0.0140.23 ▲1.7035.44 ▲0.68
Add New Post /wp-admin/post-new.php1,565 ▲3223.12 ▲0.12641.03 ▼35.2760.06 ▲6.92
Media Library /wp-admin/upload.php1,429 ▲444.18 ▲0.0198.75 ▼3.8443.18 ▼3.68
Status /wp-admin/admin.php?page=oracle-cards-status1,2182.0926.4151.12
Oracle Cards /wp-admin/edit-tags.php?taxonomy=decks&post_type=card1,4953.1943.0781.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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 | 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
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant EOS_CARDS_PLUGIN_FILE - assumed 'EOS_CARDS_PLUGIN_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/oracle-cards/admin/class-eos-oc-license-manager-client-pro.php on line 435
    • > PHP Fatal error
      require_once(): Failed opening required 'EOS_CARDS_DIR/admin/class-eos-oc-license-manager-client-pro.php' (include_path='.:/usr/share/php') in wp-content/plugins/oracle-cards/admin/oc-license-handler.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/oracle-cards/templates/single-card.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_main_site() in wp-content/plugins/oracle-cards/admin/class-eos-oc-license-manager-client-pro.php:86
    • > PHP Warning
      require_once(EOS_CARDS_DIR/admin/class-eos-oc-license-manager-client-pro.php): failed to open stream: No such file or directory in wp-content/plugins/oracle-cards/admin/oc-license-handler.php on line 8
    • > PHP Warning
      Use of undefined constant EOS_CARDS_DIR - assumed 'EOS_CARDS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/oracle-cards/admin/oc-license-handler.php on line 8

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

oracle-cards/oracle-cards.php Passed 13 tests

Analyzing the main PHP file in "Oracle Cards Lite" version 1.1.9
31 characters long description:
Random oracle cards generation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin4,515 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP172345662,771
PO File3289372892
JavaScript6311851
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity44.00
▷ Minimum class complexity23.00
▷ Maximum class complexity80.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods59
▷ Static methods813.56%
▷ Public methods4474.58%
▷ Protected methods23.39%
▷ Private methods1322.03%
Functions47
▷ Named functions4391.49%
▷ Anonymous functions48.51%
Constants16
▷ Global constants16100.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
10 PNG files occupy 0.40MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/oracle-cards.png3.07KB2.12KB▼ 30.96%
admin/img/card-back-3.png35.74KB35.89KB0.00%
admin/img/oracle-cards-icon.png0.59KB0.56KB▼ 4.98%
admin/img/icon-256x256.png14.12KB14.19KB0.00%
admin/img/card-back-5.png0.93KB0.46KB▼ 50.37%