10% daily-horoscope-widget

Code Review | Daily Horoscopes Widget

WordPress plugin Daily Horoscopes Widget scored10%from 54 tests.

About plugin

  • Plugin page: daily-horoscope-w...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.0
  • WordPress version: 6.3.1
  • First release: Nov 24, 2012
  • Latest release: Dec 14, 2013
  • Number of updates: 9
  • Update frequency: every 42.8 days
  • Top authors: DuncanMarshall (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /5,818 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/daily-horoscope-widget/daily_horoscopes_widget.php+426
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼55.54ms] Passed 4 tests

This is a short check of server-side resources used by Daily Horoscopes Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.92 ▼35.02
Dashboard /wp-admin2.05 ▼1.305.20 ▼54.42
Posts /wp-admin/edit.php2.05 ▼1.316.44 ▼38.24
Add New Post /wp-admin/post-new.php2.05 ▼3.847.11 ▼94.48
Media Library /wp-admin/upload.php2.05 ▼1.185.22 ▼24.58

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Daily Horoscopes Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.57 ▼0.991.54 ▼0.2039.14 ▼3.94
Dashboard /wp-admin2,203 ▲125.90 ▲1.01109.30 ▲4.0740.88 ▼4.38
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0440.34 ▲2.7535.25 ▲1.38
Add New Post /wp-admin/post-new.php1,519 ▲523.26 ▲5.74684.50 ▲28.1455.77 ▲1.96
Media Library /wp-admin/upload.php1,391 ▲64.24 ▲0.0296.35 ▼6.2842.49 ▼0.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/daily-horoscope-widget/daily_horoscopes_widget.php+426
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_daily_horoscopes_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors 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: Class 'WP_Widget' not found in wp-content/plugins/daily-horoscope-widget/daily_horoscopes_widget.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 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
9 plugin tags: horoscope, zodiac, star sign, daily, widget...

daily-horoscope-widget/daily_horoscopes_widget.php 92% from 13 tests

The main PHP script in "Daily Horoscopes Widget" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("daily-horoscope-widget.php" instead of "daily_horoscopes_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected253 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity5.20
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin