10% weekly-fortune-telling-cards

Code Review | Weekly Fortune Telling Cards

WordPress plugin Weekly Fortune Telling Cards scored10%from 54 tests.

About plugin

  • Plugin page: weekly-fortune-te...
  • Plugin version: 1.3.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2020
  • Latest release: Sep 18, 2023
  • Number of updates: 40
  • Update frequency: every 27.0 days
  • Top authors: powerfortunes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,390 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'power_daily_cards_plugin' not found or invalid function name

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.91ms] Passed 4 tests

Analyzing server-side resources used by Weekly Fortune Telling Cards
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.36 ▼3.93
Dashboard /wp-admin3.33 ▼0.0244.76 ▼14.39
Posts /wp-admin/edit.php3.38 ▲0.0246.96 ▼5.46
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.54 ▼7.85
Media Library /wp-admin/upload.php3.25 ▲0.0237.16 ▲6.64

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
power_weekly_cards_plugin_version
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Weekly Fortune Telling Cards
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.40 ▼1.283.91 ▲2.2440.70 ▲0.14
Dashboard /wp-admin2,203 ▲154.87 ▼1.0297.68 ▼7.6240.93 ▼1.45
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0039.07 ▼3.7433.95 ▼3.55
Add New Post /wp-admin/post-new.php1,542 ▲1118.36 ▼4.89647.44 ▲28.7751.21 ▼3.17
Media Library /wp-admin/upload.php1,388 ▼34.28 ▲0.10106.17 ▲7.0647.56 ▲4.95

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • power_weekly_cards_plugin_version
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% 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 50% 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/weekly-fortune-telling-cards/functions.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/weekly-fortune-telling-cards/unistall.php:7

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
10 plugin tags: sun signs, star sign, weekly horoscopes, zodiac, powerfortunes...

weekly-fortune-telling-cards/index.php 77% from 13 tests

The entry point to "Weekly Fortune Telling Cards" version 1.3.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("weekly-fortune-telling-cards.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 169 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected112 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31742105
CSS1017

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG images were found in this plugin