77% astro-media

Code Review | Horoscopen (NL) – Astro Media

WordPress plugin Horoscopen (NL) – Astro Media scored77%from 54 tests.

About plugin

  • Plugin page: astro-media
  • Plugin version: 1.9.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2023
  • Latest release: Nov 24, 2023
  • Number of updates: 174
  • Update frequency: every 1.2 days
  • Top authors: astromediahoroscopen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /251 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲1.78MB] [CPU: ▲8.05ms] Passed 4 tests

This is a short check of server-side resources used by Horoscopen (NL) – Astro Media
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.07 ▲1.6053.78 ▲12.59
Dashboard /wp-admin5.19 ▲1.8959.62 ▲3.48
Posts /wp-admin/edit.php5.25 ▲1.8969.12 ▲19.29
Add New Post /wp-admin/post-new.php7.71 ▲1.8393.68 ▲3.18
Media Library /wp-admin/upload.php5.03 ▲1.8045.49 ▲12.96

Server storage [IO: ▲35.29MB] [DB: ▲24.13MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • Filesystem usage must be lower than 25MB (currently using 35.29MB)
Filesystem: 94 new files
Database: 3 new tables, 6 new options
New tables
wp_customimages
wp_astromedia
wp_astrocities
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Horoscopen (NL) – Astro Media
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,048 ▲28615.17 ▲0.917.66 ▲5.8139.09 ▼4.40
Dashboard /wp-admin2,344 ▲1676.37 ▲0.72132.64 ▲39.7396.19 ▲52.56
Posts /wp-admin/edit.php2,293 ▲1903.66 ▲1.7060.28 ▲20.0368.86 ▲33.77
Add New Post /wp-admin/post-new.php1,705 ▲18021.32 ▼2.27723.81 ▲67.5538.05 ▼22.59
Media Library /wp-admin/upload.php1,487 ▲874.37 ▲0.2192.73 ▼7.1579.52 ▲36.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/astro-media/manpage/content.php
  • 35× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astro-media/shortcodes/horoscopes/shortcodes_chineserelationhoroscope.php:744
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astro-media/shortcodes/tarot/shortcodes_tarot_relatielegging.php:632
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astro-media/shortcodes/tarot/shortcodes_tarot_weeklegging_liefde.php:632
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astro-media/shortcodes/tarot/shortcodes_tarot_dagkaart_liefde.php:632
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astro-media/shortcodes/horoscopes/shortcodes_extendedchildhoroscope.php:499
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astro-media/shortcodes/lenormand/shortcodes_lenormand_relatielegging.php:436
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astro-media/shortcodes/horoscopes/shortcodes_starsignshoroscope.php:552
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astro-media/shortcodes/horoscopes/shortcodes_childparenthoroscope.php:658
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astro-media/shortcodes/horoscopes/shortcodes_silentlovehoroscope.php:439
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astro-media/shortcodes/lenormand/shortcodes_lenormand_succeslegging.php:436

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Contributors: The plugin contributors field is not present
The official readme.txt might help

astro-media/midone.php 85% from 13 tests

This is the main PHP file of "Horoscopen (NL) – Astro Media" version 1.9.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 268 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("astro-media.php" instead of "midone.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin282,208 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP403,505582280,485
JavaScript5262861,189
CSS38523534

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions66
▷ Named functions5989.39%
▷ Anonymous functions710.61%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 0.98MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/horoscopesv2/weegschaal.png63.64KB18.83KB▼ 70.41%
images/premium.png25.13KB8.92KB▼ 64.52%
images/horoscopesv2/leeuw.png81.67KB30.60KB▼ 62.53%
images/horoscopesv2/steenbok.png78.21KB23.90KB▼ 69.45%
images/placeholder.png3.05KB1.90KB▼ 37.90%