84% the-daily-horoscope

Code Review | The Daily Horoscope

WordPress plugin The Daily Horoscope scored84%from 54 tests.

About plugin

  • Plugin page: the-daily-horoscope
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 5, 2015
  • Latest release: Dec 12, 2016
  • Number of updates: 57
  • Update frequency: every 7.8 days
  • Top authors: FreddyOlsson (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /13,114 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.38ms] Passed 4 tests

Analyzing server-side resources used by The Daily Horoscope
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.37 ▲0.51
Dashboard /wp-admin3.32 ▲0.0245.45 ▲0.08
Posts /wp-admin/edit.php3.37 ▲0.0247.21 ▼2.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.52 ▼11.42
Media Library /wp-admin/upload.php3.25 ▲0.0233.03 ▲1.69

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_horoscope_widget

Browser metrics Passed 4 tests

A check of browser resources used by The Daily Horoscope
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.351.79 ▲0.1343.18 ▼0.06
Dashboard /wp-admin2,203 ▲154.89 ▼1.00109.76 ▲12.1540.81 ▼4.29
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0236.09 ▼0.4232.63 ▲1.67
Add New Post /wp-admin/post-new.php1,514 ▼1917.40 ▼5.59676.36 ▲19.1966.28 ▲11.73
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.2195.69 ▼3.5149.30 ▲6.10

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_horoscope_widget
    • theysaidso_admin_options
    • widget_recent-posts

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-daily-horoscope/index.php:13

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 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: star signs, horoscope, astrology, plugin, posts...

the-daily-horoscope/index.php 85% from 13 tests

The principal PHP file in "The Daily Horoscope" v. 1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 189 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("the-daily-horoscope.php" instead of "index.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 detected158 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24218137
CSS13413
JavaScript1007
JSON1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin