78% monthly-horoscopes

Code Review | Monthly Horoscopes

WordPress plugin Monthly Horoscopes scored78%from 54 tests.

About plugin

  • Plugin page: monthly-horoscopes
  • Plugin version: 1.3
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2018
  • Latest release: Oct 5, 2021
  • Number of updates: 32
  • Update frequency: every 38.0 days
  • Top authors: dklugmann2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,079 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.57ms] Passed 4 tests

Analyzing server-side resources used by Monthly Horoscopes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.08 ▼1.02
Dashboard /wp-admin3.37 ▲0.0651.98 ▲4.47
Posts /wp-admin/edit.php3.42 ▲0.0646.51 ▼1.15
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.94 ▼10.73
Media Library /wp-admin/upload.php3.29 ▲0.0632.61 ▼1.36
Monthly Horoscopes /wp-admin/options-general.php?page=horoscopes3.2328.81

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
initialnumbermonths
widget_recent-comments
generatedapikey

Browser metrics Passed 4 tests

A check of browser resources used by Monthly Horoscopes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.31 ▼1.332.21 ▲0.2549.65 ▲8.13
Dashboard /wp-admin2,213 ▲225.91 ▲1.0399.67 ▼2.9641.46 ▼2.17
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0235.50 ▼6.3933.86 ▼4.27
Add New Post /wp-admin/post-new.php1,545 ▲1218.11 ▼5.07589.70 ▼16.9647.72 ▼12.14
Media Library /wp-admin/upload.php1,392 ▲44.21 ▼0.0094.93 ▼3.1841.48 ▼1.89
Monthly Horoscopes /wp-admin/options-general.php?page=horoscopes8402.0522.6325.13

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • generatedapikey
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • initialnumbermonths
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=horoscopes
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=horoscopes
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/monthly-horoscopes/monthly_horoscopes.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

monthly-horoscopes/monthly_horoscopes.php 85% from 13 tests

"Monthly Horoscopes" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("monthly-horoscopes.php" instead of "monthly_horoscopes.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 329 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin294 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16188294

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions15
▷ Named functions15100.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