84% dagens-horoskop

Code Review | Dagens Horoskop

WordPress plugin Dagens Horoskop scored 84% from 54 tests.

About plugin

  • Plugin page: dagens-horoskop
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: May 30, 2016
  • Latest release: Sep 30, 2016
  • Number of updates: 26
  • Update frequency: every 9.3 days
  • Top authors: stinelarsen (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active / 4,602 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Dagens Horoskop
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0241.00 ▲4.93
Dashboard /wp-admin3.08 ▲0.0252.26 ▼0.22
Posts /wp-admin/edit.php3.13 ▲0.0248.13 ▲0.68
Add New Post /wp-admin/post-new.php5.43 ▲0.0098.64 ▼562.08
Media Library /wp-admin/upload.php3.02 ▲0.0236.73 ▼0.12

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 1 new option
New WordPress options
widget_dagens_horoskop

Browser metrics Passed 4 tests

Checking browser requirements for Dagens Horoskop
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.90 ▲0.3411.38 ▲2.6247.76 ▼4.51
Dashboard /wp-admin2,967 ▲315.89 ▼0.07168.32 ▼2.58121.43 ▲3.49
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0171.67 ▼0.3393.22 ▼3.67
Add New Post /wp-admin/post-new.php1,683 ▼2,00418.75 ▲0.31413.72 ▼133.47111.15 ▼3.81
Media Library /wp-admin/upload.php1,807 ▲595.03 ▲0.01164.25 ▲3.58120.72 ▼6.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_dagens_horoskop

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 | 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dagens-horoskop/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
7 plugin tags: horoscopeplugin, astrologi, widget, horoscope, plugin...

dagens-horoskop/index.php 85% from 13 tests

The main PHP file in "Dagens Horoskop" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 186 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dagens-horoskop.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin158 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24218137
CSS13413
JavaScript1007
JSON1001

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.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin