83% daily-horoscope-wp-widget

Code Review | Horoscope widget

WordPress plugin Horoscope widget scored 83% from 54 tests.

About plugin

  • Plugin page: daily-horoscope-w...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.5.1
  • WordPress version: 5.8.1
  • First release: Nov 11, 2012
  • Latest release: Sep 24, 2020
  • Number of updates: 76
  • Update frequency: every 37.8 days
  • Top authors: probook12 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 13,419 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
This plugin's installer ran successfully

Server metrics [RAM: ▼1.35MB] [CPU: ▼185.57ms] Passed 4 tests

A check of server-side resources used by Horoscope widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼0.4410.54 ▼15.13
Dashboard /wp-admin2.30 ▼0.7512.23 ▼37.43
Posts /wp-admin/edit.php2.30 ▼0.8111.00 ▼34.60
Add New Post /wp-admin/post-new.php2.30 ▼3.1314.43 ▼646.12
Media Library /wp-admin/upload.php2.30 ▼0.7010.43 ▼24.14

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Horoscope widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.00 ▲0.018.45 ▲0.8648.73 ▼3.58
Dashboard /wp-admin2,970 ▲335.93 ▼0.07143.29 ▼17.00114.78 ▼2.81
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0279.16 ▲7.9994.89 ▲2.32
Add New Post /wp-admin/post-new.php1,683 ▼018.78 ▲0.10386.58 ▲3.71110.52 ▼3.81
Media Library /wp-admin/upload.php1,810 ▲35.02 ▼0.01153.73 ▼10.18120.23 ▼9.18

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
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method wp_horoscope::horoscope_init() should not be called statically

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/daily-horoscope-wp-widget/horoscope-wp-widget.php:1088

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (This screen shot description corresponds to horoscope-wp.gif.)
  • Tags: You are using too many tags: 48 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The primary PHP file in "Horoscope widget" version 1.1.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("daily-horoscope-wp-widget.php" instead of "horoscope-wp-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin268 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP180721268

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected